Running WordPress on a VPS is significantly faster and more reliable than shared hosting. You get full control, better performance and flexibility. Here is how to get started.
What you need
- A VPS with Ubuntu 22.04 or Debian 12 (we recommend VPS Plus for WordPress)
- A domain pointed to your VPS IP address
- SSH access (root or sudo user)
Step 1 — Install Nginx, PHP and MySQL
Installation commands
- sudo apt update && sudo apt upgrade -y
- sudo apt install nginx php8.2-fpm php8.2-mysql php8.2-curl php8.2-gd php8.2-mbstring php8.2-xml -y
- sudo apt install mysql-server -y
Step 2 — Create a database
Log into MySQL and create a database and user for WordPress:
MySQL commands
- CREATE DATABASE wordpress;
- CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'strong_password';
- GRANT ALL ON wordpress.* TO 'wpuser'@'localhost';
- FLUSH PRIVILEGES;
Step 3 — Download WordPress
Download and extract
- cd /var/www/html
- sudo wget https://wordpress.org/latest.tar.gz
- sudo tar -xzf latest.tar.gz
- sudo chown -R www-data:www-data wordpress/
Step 4 — Configure Nginx
Create an Nginx server block for your domain and enable SSL with Certbot for HTTPS.
Step 5 — Complete the installation
Open your browser, navigate to your domain and follow the WordPress installation wizard.
Performance tips
- Install a caching plugin (WP Super Cache or W3 Total Cache)
- Use a CDN for static assets
- Enable PHP OPcache for faster execution
- Add Storage Basic for automated offsite backups