Codegea

Development

Custom software developmentSystems, platforms and integrations built around your operationCorporate websitesProfessional, fast and built to inspire trustOnline storesCatalog, payments and shipping ready to sell 24/7WooCommerceFast WooCommerce stores with each country’s payments and invoicingLanding pagesA page focused on one goal: turning visitors into customersMobile appsCustom iOS and Android apps that put your business in your customers’ pockets

Integration and CMS

CMS integrationsWordPress, Strapi, Directus and Arc XP connected to your whole ecosystemArc XPSupport, implementation and integrations for the media platformMigrationsMigrate your site, platform or database without losing anything

Growth and infrastructure

AI automationTechnology does the repetitive work and your team focuses on what mattersOn-page SEOBe found and recommended by Google: technical and content optimizationServers & hostingFast, secure servers monitored 24/7
RetainerYour dev team, by the monthFrom 20h a month. Fixed fee.
An AI quoting tool to quote services in minutesProfessional quotes in minutes, with projects, sellers and payments tracked in one place.See the case

By type

EcommerceStores and catalogsCorporate sitesBrand and lead genPlatforms & appsCustom software

Explore

All projectsCases and resultsClientsWho trusts usRetainerMonthly dev team

Blog

All articlesGuides and opinionNewsletterOne email a monthContactWe reply in 24h

Latest articles

Integrating Piano, Cxense and Google Ad Manager with Arc XPCMS · 2026-10-13How to migrate from WordPress to Arc XP without losing SEOCMS · 2026-10-13Arc XP vs WordPress for a digital media outlet: when to make the jumpCMS · 2026-10-13
NewsletterJoin our newsletterPractical web, SEO and AI notes.
ServicesCustom software developmentCorporate websitesOnline storesWooCommerceLanding pagesMobile appsCMS integrationsArc XPMigrationsAI automationOn-page SEOServers & hostingYour dev team, by the month
ProjectsProfessional quotes in minutes, with projects, sellers and payments tracked in one place.EcommerceCorporate sitesPlatforms & appsAll projectsClientsRetainer
Retainer
BlogAll articlesNewsletterContactIntegrating Piano, Cxense and Google Ad Manager with Arc XPHow to migrate from WordPress to Arc XP without losing SEOArc XP vs WordPress for a digital media outlet: when to make the jumpJoin our newsletter
ESEN
Let's talk

Servers

Deploying WordPress on a VPS with Nginx step by step

A step-by-step guide to deploying WordPress on a VPS with Nginx: the LEMP stack, database, server block, HTTPS and the most common mistakes to avoid.

Derian Pinto · Founder & Full Stack Developer2026-06-273 min
Deploying WordPress on a VPS with Nginx step by step

Moving from shared hosting to your own VPS with Nginx is a huge leap in speed and control. It is also the moment where many people get stuck: terminal, packages, configuration… But the process, properly ordered, is perfectly manageable. Here is the complete path to get WordPress running on Nginx on your own server.

Nginx is fast and lightweight, ideal for WordPress. The trick is not magic: it is following the steps in order and not skipping security.

What you are going to build: a LEMP stack

LEMP is Linux, Nginx (the E comes from its pronunciation, "engine-x"), a MariaDB or MySQL database and PHP. It is the base on which WordPress will run. We will work on a freshly installed Ubuntu with SSH access.

1. Install Nginx, the database and PHP

# Update the system and install the stack
sudo apt update && sudo apt upgrade -y
sudo apt install nginx mariadb-server php-fpm php-mysql -y

2. Create the database

First secure MariaDB with sudo mysql_secure_installation. Then log in with sudo mysql and create a dedicated database and user for WordPress (never use the root user): a CREATE DATABASE wordpress;, a CREATE USER with a strong password and a GRANT of permissions on that database. Note down those credentials: WordPress will ask for them.

3. Download and place WordPress

Download the latest version of WordPress, unpack it into /var/www/mydomain and adjust the permissions so Nginx (user www-data) can read it. Copy wp-config-sample.php to wp-config.php and fill in the database name, user and password you created in the previous step.

4. Configure the Nginx server block

Create a file in /etc/nginx/sites-available/ with the site configuration, enable it with a symbolic link to sites-enabled and reload Nginx. The essentials look like this:

server {
    listen 80;
    server_name mydomain.com;
    root /var/www/mydomain;
    index index.php index.html;
    location / {
        try_files $uri $uri/ /index.php?$args;
    }
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php-fpm.sock;
    }
}

5. Enable HTTPS and finish the installation

Point your domain to the server, issue the SSL certificate with Certbot and open https://mydomain.com: the WordPress installer will greet you to create the administrator user. Before opening it to the public, get the firewall, SSL and backups ready; I explained it in another performance guide and it is worth combining with good server maintenance.

Common mistakes

  • Wrong permissions: WordPress cannot write and updates or uploads fail.
  • Forgetting the PHP block in Nginx: the browser downloads index.php instead of running it.
  • Not configuring permalinks and getting 404 errors on posts.
  • Leaving the site on HTTP: enable HTTPS from the start.

Rehearse it twice

The first time, deploy on a test VPS and write down every command in a file. The second, do it on the real server following only those notes. With that method, what took an afternoon becomes an hour, and the notes turn into your documentation.

Before calling the site done, go through a short list: sudo nginx -t before every reload, WordPress permalinks working, a test image upload, a plugin update that writes to disk and HTTPS with a redirect from HTTP. Each point covers one of the most common mistakes in this guide.

Order matters too: database, files, Nginx and HTTPS. Problems almost always come from wanting to go fast and leaving permissions or security for later.


Want to migrate to a VPS but the terminal intimidates you? At Codegea we deploy and configure WordPress on Nginx, with SSL, backups and everything tuned, and leave it ready to work. Tell me your case.

Share this article?LinkedInWhatsAppX

Written by

Derian Pinto

Founder & Full Stack Developer

Founder of Codegea. Builds custom websites, stores and platforms, and integrates and supports Arc XP for media companies.

Join our newsletter

An email with news and practical web, SEO and AI notes. No spam, unsubscribe anytime.

Shall we build your project?

Need help? Chat with us