If your WordPress site is growing beyond what shared hosting can handle, a VPS (Virtual Private Server) is the natural next step. With dedicated CPU, RAM, and storage, your site will be faster, more reliable, and more secure.

Prerequisites

  • A WebsNP VPS (we recommend minimum 2GB RAM for WordPress)
  • SSH access to your server
  • Basic Linux command line knowledge

Step 1: Initial Server Setup

Always start with a fresh server update:

sudo apt update && sudo apt upgrade -y
sudo ufw allow OpenSSH
sudo ufw enable

Step 2: Install Nginx

sudo apt install nginx -y
sudo systemctl enable nginx
sudo systemctl start nginx
sudo ufw allow "Nginx Full"

Step 3: Install MySQL

sudo apt install mysql-server -y
sudo mysql_secure_installation

Create a dedicated database for WordPress:

CREATE DATABASE wordpress;
CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'StrongPassword123!';
GRANT ALL ON wordpress.* TO 'wpuser'@'localhost';
FLUSH PRIVILEGES;

Step 4: Install PHP 8.3

sudo apt install php8.3-fpm php8.3-mysql php8.3-xml \
  php8.3-curl php8.3-zip php8.3-mbstring php8.3-gd -y

Step 5: Configure Nginx for WordPress

Create the Nginx server block with proper WordPress permalink support:

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

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

    location ~ \.php$ {
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
}

Step 6: Install WordPress

cd /var/www
wget https://wordpress.org/latest.tar.gz
tar -xzf latest.tar.gz
chown -R www-data:www-data wordpress

Step 7: Install SSL with Let's Encrypt

sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d yourdomain.com

Performance Optimization Tips

  • Enable PHP OPcache for faster PHP execution
  • Configure Nginx FastCGI cache for static pages
  • Use Redis for WordPress object caching
  • Install fail2ban to protect against brute force attacks
A properly configured LEMP stack can handle 10× more traffic than the same server running Apache with mod_php.

Need a managed VPS setup? Contact WebsNP and our team will handle the entire configuration for you.