LUCKVM / CLOUD INFRASTRUCTURE

Explore LuckVM

Home Domains Support News Company

How to Install WordPress on VPS in 2026: Complete Step-by-Step Guide (No cPanel)

Running WordPress on a VPS with Nginx, PHP-FPM, MariaDB, and Redis is 3-5x faster than shared hosting or any cPanel setup. This guide walks you through every single command β€” copy, paste, and you'll have a production-ready WordPress site in about 30 minutes.

Disclosure: I work at LuckVM. But this guide works on any Ubuntu 22.04/24.04 VPS β€” it's not vendor-locked. If you already have a VPS somewhere else, follow along. If you don't have one yet, I'll recommend what works at the end.

1. Why WordPress on VPS vs. Shared Hosting / Managed WordPress?

Before we dive into commands, let me give you the honest comparison so you know what you're getting into:

Factor Shared Hosting Managed WP (WP Engine, etc.) VPS (this guide)
Monthly cost $3-10 $25-300+ $5-20
Typical TTFB (HK to China) 500-2000ms 200-500ms 80-200ms
Root/SSH access No No Yes
Custom software (Redis, custom PHP) Limited No Anything
Monthly visits capacity ~5,000 ~100,000 ~500,000+ (with caching)
You learn Linux No No Yes (valuable skill)
Setup time 5 minutes 10 minutes ~30 minutes
You maintain it No No Yes (we automate this)
Bottom line: If you want to learn, save money long-term, and get better performance than managed hosting at a fraction of the cost, this guide is for you. If you want zero-maintenance and don't mind paying 5-10x more, use WP Engine or SiteGround.

2. What You'll Need Before You Start

  • A VPS with at least 1 vCPU, 1GB RAM, 20GB NVMe β€” Ubuntu 22.04 LTS or 24.04 LTS. 1GB RAM is minimum; 2GB is comfortable for sites with 50k+ monthly visitors.
  • A domain name pointed at your VPS's IP address (add an A record in your DNS manager pointing @ to your VPS IP).
  • SSH client β€” Terminal on Mac/Linux, or PowerShell/Windows Terminal on Windows (no PuTTY needed; built-in ssh works).

Choosing the right VPS location

Location affects latency more than specs. Pick based on your audience:

  • Mainland China / Hong Kong / Taiwan audience β†’ Hong Kong CN2 GIA (30-50ms) or Japan (40-70ms)
  • Southeast Asia (Indo, Thai, VN, MY, SG) β†’ Singapore (20-70ms across SE Asia)
  • Global / English audience β†’ US West Coast (LA/Silicon Valley) or US East
  • Korean market β†’ Seoul (20-40ms to Korea)

Need help choosing a location? Read our Server Location Selection Guide.

3. Step-by-Step Installation

Quick Nav

  1. Connect via SSH
  2. Initial Server Hardening (new user, firewall, Fail2ban)
  3. Install Nginx
  4. Install MariaDB (MySQL)
  5. Install PHP 8.2 with PHP-FPM
  6. Configure Nginx Server Block for WordPress
  7. Download & Install WordPress (via WP-CLI)
  8. Install Free SSL (Let's Encrypt)
  9. Performance Optimization (Redis, OPcache, CDN)

Step 0: Connect to Your VPS via SSH

Open your terminal (Mac/Linux: Terminal app; Windows: PowerShell or Windows Terminal) and connect:

$ ssh root@YOUR_SERVER_IP

Replace YOUR_SERVER_IP with your VPS IP address (e.g., 43.153.128.1). The first time you connect, type yes to accept the host key, then enter your root password.

SSH connection to VPS showing Ubuntu 22.04 welcome banner

Successful SSH connection to an Ubuntu 22.04 VPS

Important: If you see "Permission denied (publickey,password)" and you haven't uploaded an SSH key yet, check your VPS provider's control panel β€” they usually give you the root password or let you upload an SSH key during provisioning.

Once connected, first update system packages:

# Update package lists and upgrade existing packages apt update && apt upgrade -y

This takes 2-3 minutes. Then install some basic utilities:

apt install -y curl wget unzip nano

Step 1: Initial Server Hardening

Do not skip this. A fresh VPS is scanned by bots within minutes. Do these before installing anything else. I cover hardening in depth in our VPS Security Hardening Guide β€” here's the condensed version.

1.1 Create a non-root user with sudo privileges

Never use root for daily operations. Create a new user (replace alex with your preferred username):

adduser alex # You'll be prompted to set a password and fill in optional info (just press Enter for optional fields) usermod -aG sudo alex

1.2 Set up UFW Firewall

ufw allow OpenSSH ufw allow 'Nginx Full' ufw enable # Verify: ufw status

You should see ports 22 (SSH), 80 (HTTP), and 443 (HTTPS) allowed.

1.3 Install Fail2ban to block brute-force SSH attempts

apt install -y fail2ban systemctl enable fail2ban && systemctl start fail2ban

Fail2ban automatically bans IPs that fail SSH login 5+ times. That alone blocks 99% of automated bot attacks.

UFW firewall status and Fail2ban service running

UFW allowing only necessary ports, Fail2ban active and running

Optional but strongly recommended: Set up SSH key authentication and disable password login for SSH. This is covered in detail in our full security hardening guide (Step 2). For the scope of this guide, we'll continue with password auth so we can get WordPress running faster β€” but do set up SSH keys after finishing this tutorial.

Step 2: Install Nginx Web Server

Nginx is faster and more resource-efficient than Apache for WordPress, especially with caching. Let's install it:

apt install -y nginx systemctl enable nginx && systemctl start nginx

Verify Nginx is running by visiting http://YOUR_SERVER_IP in your browser. You should see the "Welcome to nginx!" default page. Or verify via command line:

systemctl status nginx # Should say: active (running)

Step 3: Install MariaDB (MySQL-compatible Database)

MariaDB is the open-source fork of MySQL, fully compatible with WordPress, and generally faster. Install it:

apt install -y mariadb-server mariadb-client systemctl enable mariadb && systemctl start mariadb

Run the secure installation script:

mysql_secure_installation

Answer the prompts like this:

  • Enter current password for root: (press Enter, no password set by default)
  • Switch to unix_socket authentication? Y
  • Change the root password? N (unix socket auth is more secure)
  • Remove anonymous users? Y
  • Disallow root login remotely? Y
  • Remove test database? Y
  • Reload privilege tables? Y

Now create a database and database user for WordPress. Replace wp_db, wp_user, and STRONG_PASSWORD_HERE with your own values:

mysql -u root -- Inside MariaDB shell: MariaDB [(none)]> CREATE DATABASE wp_db DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; MariaDB [(none)]> CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'STRONG_PASSWORD_HERE'; MariaDB [(none)]> GRANT ALL PRIVILEGES ON wp_db.* TO 'wp_user'@'localhost'; MariaDB [(none)]> FLUSH PRIVILEGES; MariaDB [(none)]> EXIT;
Write down the database name, username, and password β€” you'll need them in Step 6 when configuring WordPress.

Step 4: Install PHP 8.2 with PHP-FPM

WordPress 6.6 officially recommends PHP 8.1 or 8.2. PHP 8.3 works too, but 8.2 has the best compatibility with plugins. We'll use PHP-FPM (FastCGI Process Manager) for best performance with Nginx.

apt install -y php8.2-fpm php8.2-mysql php8.2-curl php8.2-gd php8.2-mbstring php8.2-xml php8.2-xmlrpc php8.2-soap php8.2-intl php8.2-zip php8.2-bcmath php8.2-opcache

Edit the PHP-FPM pool config to set reasonable upload limits and timezone:

nano /etc/php/8.2/fpm/pool.d/www.conf # Optional: change pm = dynamic to pm = ondemand for low-memory VPS # For 1GB RAM, set pm.max_children = 5, pm.start_servers = 2, pm.min_spare_servers = 1, pm.max_spare_servers = 3

Edit PHP settings for WordPress:

nano /etc/php/8.2/fpm/php.ini

Find and update these values (use Ctrl+W to search in nano):

upload_max_filesize = 64M post_max_size = 128M memory_limit = 256M max_execution_time = 300 max_input_time = 300 date.timezone = UTC # Replace UTC with your timezone (e.g. Asia/Shanghai, Asia/Singapore, America/Los_Angeles)

Restart PHP-FPM:

systemctl restart php8.2-fpm

Verify all three main services are running:

systemctl is-active nginx mariadb php8.2-fpm # All three should say "active"
Nginx, MariaDB, PHP 8.2-FPM all running, curl test returning 200 OK

All three core services running and Nginx responding with HTTP 200

Step 5: Configure Nginx Server Block for WordPress

Create a server block (similar to Apache VirtualHost) for your domain. Replace example.com with your actual domain name everywhere below:

nano /etc/nginx/sites-available/example.com

Paste this configuration (replace example.com with your domain):

server { listen 80; server_name example.com www.example.com; root /var/www/example.com; index index.php index.html; # Logging access_log /var/log/nginx/example.com.access.log; error_log /var/log/nginx/example.com.error.log; # WordPress pretty permalinks location / { try_files $uri $uri/ /index.php?$args; } # PHP-FPM handling location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php8.2-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } # Deny access to .htaccess and hidden files location ~ /\. { deny all; } # Static file caching (improves TTFB drastically) location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { expires 365d; add_header Cache-Control "public, immutable"; } # Gzip compression gzip on; gzip_types text/plain text/css application/json application/javascript text/xml application/xml text/javascript image/svg+xml; gzip_min_length 256; }

Enable the site by creating a symlink, disable the default site, and test Nginx config:

ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/ rm /etc/nginx/sites-enabled/default nginx -t # Should say: "syntax is ok" and "test is successful" systemctl reload nginx

Create the web root directory and set proper permissions:

mkdir -p /var/www/example.com chown -R www-data:www-data /var/www/example.com

Step 6: Download and Install WordPress (using WP-CLI)

We'll use WP-CLI (WordPress Command Line Interface) β€” it's faster than the web installer, avoids manual file uploads, and is the standard tool for professional WordPress management.

Install WP-CLI:

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar chmod +x wp-cli.phar mv wp-cli.phar /usr/local/bin/wp

Download WordPress:

cd /var/www/example.com sudo -u www-data wp core download --locale=en_US # Use --locale=zh_CN for Chinese, --locale=ja for Japanese, etc.

Create wp-config.php:

cd /var/www/example.com sudo -u www-data wp config create \ --dbname=wp_db \ --dbuser=wp_user \ --dbpass='STRONG_PASSWORD_HERE' \ --dbhost=localhost \ --dbcharset=utf8mb4 # Replace STRONG_PASSWORD_HERE with the password you set in Step 3

Run the WordPress installation:

cd /var/www/example.com sudo -u www-data wp core install \ --url=http://example.com \ --title="My Awesome Blog" \ --admin_user=admin \ --admin_password='CHOOSE_A_STRONG_ADMIN_PASSWORD' \ --admin_email=you@example.com
Use a strong admin password! WordPress brute-force attacks try admin/admin123 thousands of times per day on every VPS.

At this point WordPress is installed! If you visit http://example.com you should see the default WordPress page. To log in, go to http://example.com/wp-admin.

WordPress famous 5-minute installation wizard form

If you install via browser instead of WP-CLI, you'll see this wizard β€” but WP-CLI is faster

WordPress admin dashboard showing welcome screen

WordPress 6.6 admin dashboard after successful installation

Step 7: Install Free SSL with Let's Encrypt

Your site is currently HTTP (not encrypted). Every site needs HTTPS in 2026 β€” not just for security, but for SEO (Google ranks HTTPS higher) and browser trust indicators.

Install Certbot and the Nginx plugin:

apt install -y certbot python3-certbot-nginx

Obtain and install the SSL certificate:

certbot --nginx -d example.com -d www.example.com

When prompted:

  • Enter your email (for renewal notifications)
  • Agree to the Terms of Service: Y
  • Share email with EFF: N (optional)
  • Redirect HTTP to HTTPS: choose 2 (Redirect) β€” this automatically redirects all HTTP traffic to HTTPS

Certbot will edit your Nginx config automatically and set up HTTPS. Test by visiting https://example.com β€” you should see a padlock πŸ”’ in your browser's address bar.

Certbot installs an automatic renewal timer. Verify it works:

certbot renew --dry-run # Should say "The dry run was successful."

Step 8: Post-Installation Optimization (Makes Your Site 3-5x Faster)

At this point you have a working WordPress site, but it's running without any caching. Let's fix that. A properly cached WordPress site can handle 1000+ concurrent visitors on a 1 vCPU / 1GB VPS.

8.1 Enable OPcache (PHP bytecode caching)

OPcache stores compiled PHP scripts in memory so PHP doesn't re-parse them on every request. Edit OPcache settings:

nano /etc/php/8.2/fpm/conf.d/10-opcache.ini

Add or update these lines:

opcache.enable=1 opcache.memory_consumption=128 opcache.interned_strings_buffer=8 opcache.max_accelerated_files=10000 opcache.revalidate_freq=60 opcache.fast_shutdown=1

Restart PHP-FPM:

systemctl restart php8.2-fpm

8.2 Install Redis for Object Caching

Redis stores WordPress database queries in memory, drastically reducing MySQL load:

apt install -y redis-server php8.2-redis systemctl enable redis-server && systemctl start redis-server systemctl restart php8.2-fpm

Then install the Redis Object Cache plugin from WordPress admin β†’ Plugins β†’ Add New, and enable it in Settings β†’ Redis. Click "Enable Object Cache" and it will connect automatically.

8.3 Install FastCGI Cache in Nginx

Nginx FastCGI Cache caches full page responses, making your site as fast as a static HTML site. This is the single biggest performance win you can get. Add this to your server block inside the server { } block for HTTPS (the one Certbot created):

nano /etc/nginx/sites-enabled/example.com

Add above the location ~ \.php$ block:

# FastCGI Cache set $skip_cache 0; if ($request_method = POST) { set $skip_cache 1; } if ($query_string != "") { set $skip_cache 1; } if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") { set $skip_cache 1; } fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_zone=WORDPRESS:100m inactive=60m; fastcgi_cache_key "$scheme$request_method$host$request_uri"; fastcgi_cache_use_stale error timeout invalid_header http_500; fastcgi_ignore_headers Cache-Control Expires Set-Cookie; location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php8.2-fpm.sock; fastcgi_cache WORDPRESS; fastcgi_cache_bypass $skip_cache; fastcgi_no_cache $skip_cache; fastcgi_cache_valid 200 60m; fastcgi_cache_valid 404 1m; add_header X-FastCGI-Cache $upstream_cache_status; }
mkdir -p /etc/nginx/cache nginx -t && systemctl reload nginx

8.4 Install Essential WordPress Plugins (Don't Overdo It)

You don't need 30 plugins. Here's the bare minimum for a fast, secure site:

  • Redis Object Cache β€” object caching (installed above)
  • WP Rocket (paid, $59/yr) or W3 Total Cache (free) β€” for JS/CSS minification and lazy loading
  • Wordfence Security (free) β€” firewall and malware scanner
  • Yoast SEO or Rank Math (free) β€” SEO management
  • UpdraftPlus (free) β€” automated backups (set to backup to S3/GDrive/SFTP weekly)
  • Smush or ShortPixel β€” image compression (critical for speed)

8.5 Use a CDN for Static Assets

If your audience is global, use Cloudflare (free plan works great) as a CDN. Cloudflare caches static assets (images, CSS, JS) at 300+ edge locations worldwide and provides free DDoS protection. If you're targeting a specific region (e.g., China/Asia), use a CDN with Asian edge nodes.

CDN note for China-facing sites: Cloudflare's free plan routes China traffic through Hong Kong or US (100-200ms). If you need faster China performance, you need a China-optimized CDN like Cloudflare China Partner, Qiniu, or Aliyun CDN β€” but those require ICP filing for mainland China CDN nodes. For most small-to-medium sites, Cloudflare free + Hong Kong CN2 GIA VPS is a great combo.

Step 9: Verify Performance

After all optimizations, test your site:

  • Visit Google PageSpeed Insights β€” you should aim for 90+ on Performance
  • Use GTmetrix to check TTFB and page load time
  • Check headers: curl -I https://example.com should show X-FastCGI-Cache: HIT on second load

On a LuckVM Hong Kong CN2 GIA VPS (1 vCPU / 1GB RAM NVMe), I consistently get these numbers after full optimization:

k6 load test showing 1000 concurrent users at 243ms p95, PageSpeed score 97/100

Left: k6 load test at 1000 concurrent users (0 errors, p95 = 243ms). Right: Google PageSpeed score 97/100 (mobile)

Metric Result Grade
Time To First Byte (TTFB, local China) 80-130ms Excellent
Largest Contentful Paint (LCP) 0.8-1.2s Excellent
PageSpeed Performance (mobile) 94-98 Excellent
Concurrent users before slowdown ~500-1000 Great for 1GB RAM
Monthly visits capacity 300k-500k Way more than most sites need

4. Common Problems and Fixes

Problem 1: "404 Not Found" on all pages except homepage

Nginx isn't processing WordPress permalinks. Make sure you have try_files $uri $uri/ /index.php?$args; in your location / block, then nginx -t && systemctl reload nginx. Also go to WordPress admin β†’ Settings β†’ Permalinks and click "Save Changes" (no changes needed; just saving flushes rewrite rules).

Problem 2: "502 Bad Gateway"

PHP-FPM crashed or isn't running. Check with systemctl status php8.2-fpm. Common causes: PHP ran out of memory (increase memory_limit in php.ini), or too many PHP-FPM child processes (reduce pm.max_children for low-RAM VPS).

Problem 3: "Error establishing a database connection"

Either MariaDB is down (systemctl start mariadb), or the credentials in wp-config.php are wrong. Check DB name, user, and password with mysql -u wp_user -p.

Problem 4: White screen of death (blank white page)

Usually a PHP fatal error from a plugin. Enable debug mode in wp-config.php: add define('WP_DEBUG', true); then refresh to see the actual error. Disable the offending plugin via wp plugin deactivate plugin-name.

Problem 5: Can't upload media / "Missing a temporary folder"

PHP temp directory is missing or not writable. Fix: mkdir -p /var/lib/php/tmp_upload && chown www-data:www-data /var/lib/php/tmp_upload then add to php.ini: upload_tmp_dir = /var/lib/php/tmp_upload.

Problem 6: SSL works but browser says "Not secure"

Mixed content β€” some resources are still loading over HTTP. Install the Really Simple SSL plugin to fix all URLs automatically. Also make sure site URL in Settings β†’ General uses https://.

Problem 7: WP-CLI says "This does not seem to be a WordPress installation"

You're not in the WordPress directory. cd /var/www/example.com first. Or run with --path=/var/www/example.com.

Problem 8: Can't install/update plugins (asks for FTP credentials)

File ownership issue. Fix: chown -R www-data:www-data /var/www/example.com. WordPress can only write files if the web server user owns the files.

Problem 9: Emails from WordPress (password reset, contact forms) not arriving

PHP mail() is unreliable and often blocked by VPS providers. Install the WP Mail SMTP plugin and send email via SendGrid (free 100/day), Mailgun, Amazon SES, or your SMTP provider.

Problem 10: Site feels slow from your location

Most likely the wrong server location. If you're in Shanghai and your VPS is in New York, TTFB will be 250ms+. That's physics β€” you can't optimize it away. Pick a server close to your audience. If your audience is spread worldwide, use a CDN (Cloudflare). See our server location guide.

5. Post-Setup Maintenance Checklist

A VPS isn't set-it-and-forget-it. Do these regularly:

  • Weekly: Check for plugin/theme updates, run a backup (UpdraftPlus), review Fail2ban bans
  • Monthly: Run apt update && apt upgrade for security patches, test a restore from backup, review disk usage (df -h)
  • Every 3 months: Update WordPress core major versions, rotate admin passwords, review Nginx/PHP error logs for issues
  • Setup monitoring: Use a free service like UptimeRobot to alert you if your site goes down. For more serious sites, install Netdata (free, self-hosted) for detailed server metrics.

6. Frequently Asked Questions

Do I need a control panel (cPanel, DirectAdmin, Plesk)?
No. This guide uses zero control panels. Control panels add overhead (you lose 200-400MB RAM just running them), cost money (cPanel is $15+/month), and don't give you better performance. If you really want a panel, try CyberPanel or aaPanel (both free) β€” but learn the command line first; it's not that hard.
Can I use Apache instead of Nginx?
Yes, but Nginx is faster for static content and handles concurrent connections better. If you're already comfortable with Apache and .htaccess, use Apache. For new setups, Nginx is the better default in 2026.
What about Docker/Podman?
Docker is great for orchestrating multiple services in production or if you already know Docker, but for a single WordPress site it adds unnecessary complexity. Start with a native install like this guide; migrate to Docker when you need to scale or add more services.
How much traffic can a 1 vCPU / 1GB VPS handle?
With proper caching (Redis + FastCGI Cache + CDN), 300,000-500,000 visits/month. Without caching, maybe 5,000-10,000. Caching is everything.
Is 512MB RAM enough for WordPress?
Barely. You can run WordPress in 512MB but you'll need swap space, no Redis, and very lean plugins. 1GB is the realistic minimum for a comfortable experience.
Do I need a separate database server?
For sites under 1M visits/month, running MariaDB on the same VPS is fine. Separate database servers are for high-traffic or multi-server deployments.
Can I host multiple WordPress sites on one VPS?
Yes. Create additional server blocks in /etc/nginx/sites-available/ (one per domain), separate databases and database users, and separate directories under /var/www/. A 2 vCPU / 4GB VPS can easily host 10-20 WordPress sites.
How do I set up email for my domain?
Do NOT run your own mail server on a VPS β€” it's a full-time job dealing with spam lists, SPF/DKIM/DMARC, blacklists, and deliverability. Use a dedicated email service: Google Workspace ($6/user/mo), Microsoft 365, Zoho Mail (free for 5 users), or for transactional email (password resets, notifications) use SendGrid, Mailgun, or Amazon SES.
How do I backup my WordPress site?
Use UpdraftPlus (plugin) to schedule automated backups to external storage (S3, Google Drive, SFTP). Also set up server-level VPS snapshots via your provider's control panel before major updates. Always store backups off-server β€” a backup on the same VPS is not a backup.
How do I migrate an existing WordPress site?
Use the All-in-One WP Migration plugin (free) β€” install it on both old and new sites, export from old, import to new. For large sites (1GB+), use WP-CLI: wp db export on old server, rsync the files, wp db import on new server, then search-replace URLs.
My WordPress admin is slow even with caching.
Caching plugins typically don't cache admin pages (for logged-in users). If /wp-admin is slow, check: PHP memory_limit (try 512M), too many admin-ajax.php calls from plugins, missing Redis (object cache helps admin too), or the simple fact that you're connecting from far away β€” use a server closer to you.
Can I use this setup for WooCommerce?
Yes, but WooCommerce needs more resources. Minimum 2 vCPU / 2GB RAM, 4GB recommended. WooCommerce pages (cart, checkout, account) bypass caching because they're dynamic, so more PHP workers = better checkout performance. Add Redis for session caching and consider using Cloudflare for bot protection.
Is Let's Encrypt SSL trusted by all browsers?
Yes. Let's Encrypt is trusted by every major browser and operating system. There's no reason to pay for an SSL certificate in 2026 unless you need EV (Extended Validation) certificates for a bank or financial institution.
How often should I update WordPress?
Enable auto-updates for minor releases (WordPress does this by default for security updates). Major releases (e.g., 6.6 β†’ 6.7) β€” wait 1-2 weeks and read release notes to check for plugin/theme compatibility issues before updating on production sites.
Do I need Cloudflare if my VPS already has DDoS protection?
It's still recommended. Cloudflare provides CDN (caching at edge locations, faster global delivery), hides your origin IP from attackers, and provides an additional layer of DDoS protection. The free plan is more than enough for most sites.
What Ubuntu version should I use?
Use the latest LTS (Long Term Support) release. As of 2026 that's Ubuntu 24.04 LTS. Ubuntu 22.04 LTS is also fine and supported until 2027. Avoid non-LTS releases for production servers.
Can I run this on a VPS with less than 1GB RAM (like 512MB)?
You can, but you'll need to add swap space (1GB), disable Redis (no object cache), reduce PHP-FPM pm.max_children to 2-3, and use a lighter theme. It'll work but won't be fast. If you can afford $1-2 more per month, 1GB makes a night-and-day difference.
Is this setup secure for production?
Yes, if you completed Step 1 (hardening) and keep everything updated. But production security is a continuous process, not a checklist. Read our full VPS Security Hardening Guide for additional steps like SSH keys, automatic updates, two-factor auth, and more.

Ready to launch your WordPress site?

A VPS optimized for WordPress with NVMe SSD, CN2 GIA low-latency routes, and free DDoS protection starts at $4.99/month. Deploy in 60 seconds, month-to-month billing, 3-day refund.

Browse Cloud Server Plans β†’

Already have a VPS? The tutorial above works on any Ubuntu 22.04/24.04 server β€” no need to use ours.