VPS Series · Post 1 of 5

How to Setup a VPS from Scratch
and Host Your WordPress Site

I recently moved example.com off shared hosting onto a Contabo Cloud VPS — 6 cores, 12GB RAM, 100GB NVMe for $7.95/month. This post covers everything from the first SSH login to a live WordPress site with a proper Nginx + PHP 8.3 + MySQL stack behind Cloudflare.

1 Connect to Your VPS via SSH

Once your VPS is provisioned, you'll get an IP and root password via email. On Windows, open PowerShell or use MobaXterm:

bash
ssh root@192.0.2.100

Tip: First time connecting will ask you to confirm the host fingerprint. Type yes and press Enter.

2 First Things After Login

Update the system packages and set a memorable hostname:

bash
# Update all packages
apt update && apt upgrade -y

# Set hostname (optional but clean)
hostnamectl set-hostname myvps

Create a non-root user

It's best practice not to work as root. Create a sudo user:

bash
adduser sysadmin
usermod -aG sudo sysadmin

3 Install Nginx

We'll use Nginx as our web server — it's faster than Apache for static assets and handles WordPress well with PHP-FPM:

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

# Verify it's running
systemctl status nginx

4 Install MySQL

bash
apt install mysql-server -y
mysql_secure_installation

mysql_secure_installation will ask several questions. Set a strong root password, remove anonymous users, and disable remote root login.

5 Install PHP 8.3

Ubuntu 24.04 ships with PHP 8.3 in its default repos — no PPA needed:

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

# Verify
php -v

6 Configure Firewall

bash
ufw allow 'Nginx Full'
ufw allow OpenSSH
ufw enable
ufw status

7 Connect Cloudflare DNS

In your Cloudflare dashboard, add these A records pointing to your VPS IP:

dns records
Type    Name    Content          Proxy
A       @       192.0.2.100      Proxied ✅
A       www     192.0.2.100      Proxied ✅

Since Cloudflare handles SSL, set SSL/TLS → Overview → Full in your Cloudflare dashboard. Don't use "Full Strict" until you have a server-side SSL cert installed.

Visit http://YOUR_IP — you should see the Nginx welcome page. Your LEMP stack is ready. Continue to Post 2 to install WordPress on it.

VPS Specs Used

  • Provider: Contabo
  • Plan: Cloud VPS 20 NVMe
  • RAM: 12 GB
  • CPU: 6 cores
  • Disk: 100 GB NVMe
  • Price: $7.95/mo
  • OS: Ubuntu 24.04 LTS