Setting Up a WordPress Site on a VPS (Step-by-Step)

May 11, 2026 · CutVPS Team · 6 min read

Tired of shared hosting limits? Ready to install anything you want on your server? A VPS gives you real control over WordPress — but only if you need it. Here's exactly how to set it up.

Moving from shared hosting to a VPS (Virtual Private Server) feels like upgrading from a studio apartment to your own house. You get the keys. You make the rules. But you also have to fix the plumbing when it breaks.

Here's how to get WordPress running on your VPS without breaking anything important.

Is This Even Right for You?

Let's be honest — most people don't need a VPS for WordPress.

Stick with managed WordPress hosting if:

You need a VPS when:

I had a customer ask about our cheapest VPS hosting plan for a personal blog getting 200 visits daily. I told them Netlify's free tier was better. They came back six months later when they actually needed the control.

What You'll Need Before Starting

Don't wing this. Get these ready first:

We're using Ubuntu 22.04 LTS for this guide because it's stable and boring (good traits for servers).

Step 1: Set Up Your Server Environment

First, update everything:


sudo apt update && sudo apt upgrade -y

Install the LAMP stack (Linux, Apache, MySQL, PHP — the WordPress essentials):


sudo apt install apache2 mysql-server php libapache2-mod-php php-mysql php-curl php-gd php-xml php-mbstring php-zip -y

Start and enable Apache:


sudo systemctl start apache2
sudo systemctl enable apache2

Your server's now serving web pages. Visit your IP address in a browser — you should see the Apache default page.

Step 2: Secure MySQL and Create a Database

Run MySQL's security script:


sudo mysql_secure_installation

Say yes to everything except the password validation plugin (unless you want the extra hassle).

Create a database for WordPress:


sudo mysql -u root -p

Inside MySQL, run these commands:


CREATE DATABASE wordpress_db;
CREATE USER 'wordpress_user'@'localhost' IDENTIFIED BY 'your_strong_password';
GRANT ALL PRIVILEGES ON wordpress_db.* TO 'wordpress_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Replace your_strong_password with something actually strong. Not password123.

Step 3: Configure Apache Virtual Host

Create a configuration file for your site:


sudo nano /etc/apache2/sites-available/yourdomain.com.conf

Add this configuration (replace yourdomain.com with your actual domain):


<VirtualHost *:80>
    ServerName yourdomain.com
    ServerAlias www.yourdomain.com
    DocumentRoot /var/www/yourdomain.com
    
    <Directory /var/www/yourdomain.com>
        AllowOverride All
        Require all granted
    </Directory>
    
    ErrorLog ${APACHE_LOG_DIR}/yourdomain_error.log
    CustomLog ${APACHE_LOG_DIR}/yourdomain_access.log combined
</VirtualHost>

Enable the site and Apache's rewrite module:


sudo a2ensite yourdomain.com.conf
sudo a2enmod rewrite
sudo systemctl restart apache2

Step 4: Download and Configure WordPress

Create your site directory and download WordPress:


sudo mkdir /var/www/yourdomain.com
cd /tmp
wget https://wordpress.org/latest.tar.gz
tar -xzf latest.tar.gz
sudo cp -R wordpress/* /var/www/yourdomain.com/

Set proper permissions (this matters — get it wrong and WordPress can't update itself):


sudo chown -R www-data:www-data /var/www/yourdomain.com/
sudo find /var/www/yourdomain.com/ -type d -exec chmod 755 {} \;
sudo find /var/www/yourdomain.com/ -type f -exec chmod 644 {} \;

Copy the sample configuration file:


cd /var/www/yourdomain.com/
sudo cp wp-config-sample.php wp-config.php
sudo nano wp-config.php

Update the database settings with what you created earlier:


define('DB_NAME', 'wordpress_db');
define('DB_USER', 'wordpress_user');
define('DB_PASSWORD', 'your_strong_password');
define('DB_HOST', 'localhost');

Step 5: Complete WordPress Installation

Visit your domain in a browser. You should see the WordPress installation screen.

Fill in your site details:

Click "Install WordPress" and you're done with the basic setup.

VPS vs Managed WordPress: The Numbers

| Feature | Shared/Managed WP | VPS (DIY) | VPS (CutVPS Starter) |

|---------|-------------------|-----------|----------------------|

| Monthly cost | $15-25 | $5-40 | $20 |

| RAM | 1GB (shared) | 2-4GB | 4GB |

| Storage | 50GB HDD | 80GB+ | 80GB NVMe |

| Server management | Included | You handle it | You handle it |

| Custom software | Limited | Full control | Full control |

| Performance | Variable | Consistent | Consistent |

The best budget VPS 2026 isn't always the cheapest monthly price — it's the one that doesn't need constant babysitting.

Essential Security Hardening

Don't skip this part. A wide-open VPS is a hacked VPS.

Install and configure a firewall:


sudo ufw allow OpenSSH
sudo ufw allow 'Apache Full'
sudo ufw enable

Install SSL certificate with Let's Encrypt:


sudo apt install certbot python3-certbot-apache -y
sudo certbot --apache -d yourdomain.com -d www.yourdomain.com

The certificate auto-renews, but test it:


sudo certbot renew --dry-run

Change WordPress security keys in wp-config.php using WordPress's salt generator.

Most VPS hosting under $10 providers skip mentioning security because it adds support tickets. We'd rather tell you upfront — an unpatched server costs more than the monthly savings.

FAQ

How much RAM does WordPress actually need?

2GB minimum for a single site with light traffic. 4GB if you're running multiple sites or expect traffic spikes. 1GB works but WordPress updates will be painful.

Should I use Apache or Nginx?

Apache is easier for beginners because .htaccess files just work. Nginx is faster but requires more configuration knowledge. Start with Apache.

What if I mess up the server?

That's what backups are for. Most VPS providers offer snapshot backups. Take one before making changes. At CutVPS, you can restore from a snapshot in under 5 minutes through our control panel.

How often should I update everything?

WordPress core and plugins monthly minimum. Security updates immediately. System packages monthly. Set up automatic security updates for the OS.

Ready to ditch shared hosting limits? Our Starter VPS gives you 2 vCPUs, 4GB RAM, and 80GB NVMe storage for $20/month — enough power for multiple WordPress sites without the "unlimited" asterisks. Check out CutVPS plans and get full root access to a server that's actually yours.

Ready to get your own VPS? Plans from $15/month with NVMe storage and full root access.

View Plans