Guides · Migration guides

Managed WordPress to VPS + Nginx migration in 2026: take back control

We are paid if you buy through an 'Order' link. 'Visit' links pay us nothing.

This guide prices the move at Hetzner.

Visit Hetzner, opens hetzner.com in a new tab

Moving from managed WordPress hosting (Cloudways at $14-54/mo, Kinsta at $35-225/mo, WP Engine at $25-50+/mo) to a self-managed VPS running Nginx costs $4.60-7.60/mo in hosting fees. The savings are real. The trade-offs are also real, and plain guides in this category are rare.

Figures in this text were written 22 Sep 2026.

Prices in this guide, checked 28 Nov 2026

  1. Hetzner CPX021 vCPU, 1 GB, 20 GB NVMe

    $8.09/mo before tax · $7.49 server + $0.60 IPv4 · Germany; $6.59 in Helsinkichecked 28 Nov 2026

  2. Cloudways DO Standard 1GB (managed)1 vCPU, 1 GB, 25 GB SSD

    $11/mo before taxchecked 25 Nov 2026

  3. Kinsta Single 35kvCPU not stated, 35k visits, 10 GB SSD

    $35/mochecked 28 Nov 2026

How we pick: the plans this guide names, then the providers it names, then the cheapest we would pick, in that order, each one you can order today; cheapest first within each of the three. Figures in the text below were written 22 Sep 2026. Prices in this table were checked 28 Nov 2026 on each provider's own site. How we check prices

Cost comparison

Current managed plan Self-managed VPS Monthly saved
Cloudways DO 1 GB ($14) Hetzner CX22 ($4.60) -$9.40
Cloudways DO 2 GB + add-ons ($43) Hetzner CX32 ($7.60) -$35
Kinsta Starter ($35) Hetzner CX22 ($4.60) -$30
Kinsta Pro ($70) Hetzner CX32 ($7.60) -$62
WP Engine Startup renewal ($50) Hetzner CX22 ($4.60) -$45

Annual savings: $110-750+ per site.

When to do this migration

  • You are technical. Comfortable with apt, systemctl, editing Nginx config, reading Linux logs.
  • You have time. 4-8 hours for initial setup, 1-2 hours/month ongoing.
  • You want full control. PHP settings, cache tuning, custom modules, cron precision.
  • Cost matters. The savings are substantial at scale.

When NOT to do this migration

  • You are not a developer or sysadmin. The managed-hosting premium exists for good reason.
  • Your revenue depends on the site. Uptime and incident response are your problem now.
  • Support quality was a big part of why you were on managed. You don't get support on a VPS.
  • You need automatic scaling. Manual resize on VPS is minutes; managed auto-scale is seconds.

Step-by-step (LEMP stack)

1. Provision Hetzner CX22 or CX32

Ubuntu 24.04 LTS. See our shared hosting to plain VPS guide for basic hardening steps (SSH keys only, UFW, unattended-upgrades).

2. Install the stack

apt update
apt install nginx php-fpm php-mysql php-curl php-gd php-mbstring php-xml php-zip php-imagick php-intl mariadb-server certbot python3-certbot-nginx redis-server

Redis for object cache; Nginx as the web server; PHP-FPM for WordPress; MariaDB for the database.

3. Configure PHP-FPM for WordPress

Edit /etc/php/8.3/fpm/pool.d/www.conf:

pm = dynamic
pm.max_children = 25
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 15
pm.max_requests = 1000

memory_limit in /etc/php/8.3/fpm/php.ini — set to 256M or 512M for real WordPress.

Restart: systemctl restart php8.3-fpm

4. Configure Nginx with WordPress-friendly rules

Create /etc/nginx/sites-available/yourdomain.com:

# FastCGI cache zone (define at http level, we'll skip here for brevity)
# fastcgi_cache_path /var/cache/nginx levels=1:2 keys_zone=WORDPRESS:100m inactive=60m;

server {
    server_name yourdomain.com www.yourdomain.com;
    root /var/www/yourdomain.com;
    index index.php;

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; allow all; }

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
        # Optional: enable FastCGI cache for anonymous traffic
        # fastcgi_cache WORDPRESS;
        # fastcgi_cache_valid 200 60m;
    }

    # Static assets — long cache
    location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2)$ {
        expires 1y;
        add_header Cache-Control "public, immutable";
    }

    # Deny access to sensitive files
    location ~ /\.ht { deny all; }
    location = /wp-config.php { deny all; }
}

ln -s /etc/nginx/sites-available/yourdomain.com /etc/nginx/sites-enabled/

nginx -t && systemctl reload nginx

5. Configure Redis object cache

# Enable Redis (already installed)
systemctl enable --now redis-server

In your WordPress site: install the "Redis Object Cache" plugin from wordpress.org, activate, click "Enable Object Cache". Done.

6. Export from managed WordPress

Cloudways/Kinsta/WP Engine all provide a "download backup" option that gives you a .zip of files + .sql of the database.

7. Import to your VPS

Same pattern as our shared hosting migration guide: unzip to /var/www/yourdomain.com, mysqldump-import to a new DB, update wp-config.php connection details.

8. SSL via Let's Encrypt

certbot --nginx -d yourdomain.com -d www.yourdomain.com

Auto-renewal is set up by Certbot's cron.

9. Cloudflare in front (free)

Point your DNS at Cloudflare. Cloudflare's free tier gives you a real CDN and DDoS protection. Add a page rule to cache HTML for anonymous visitors and you'll match the perceived speed of managed hosting.

10. Backups

Cron nightly mysqldump | gzip and tar cz of /var/www to Backblaze B2 or DO Spaces. See our shared hosting migration guide for the script.

11. Uptime monitoring

Sign up for UptimeRobot (free tier) or Better Uptime. This is not optional if you don't have a paid support team paging you.

12. DNS cutover

Standard.

13. Cancel managed hosting

Take a final backup, cancel.

What you gain

  • ~$10-70/mo saved per site.
  • Full control over every layer of the stack.
  • Skill in Linux, Nginx, PHP-FPM, MariaDB that transfers to every future project.
  • No renewal price traps or forced-plan-upgrades.

What you take on

  • Uptime is your problem. You will be paged (or not paged, and lose visitors silently).
  • Security is your problem. Log review, IP banning (fail2ban), keeping the OS patched.
  • Performance tuning is your problem. OPcache config, FastCGI cache config, PHP-FPM pool sizing.
  • Debug time when WordPress or a plugin breaks.

Related guides

Figures in this text were written 22 Sep 2026.