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:
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:
# 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:
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:
apt install nginx -y
systemctl enable nginx
systemctl start nginx
# Verify it's running
systemctl status nginx
4 Install MySQL
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:
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
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:
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.