VPS Setup Guide 2026 – From Zero to Live Server

Easy step-by-step tutorial for beginners • Updated May 2026

Recommended for: Contabo, Hostinger VPS, InterServer, Hetzner, or any Ubuntu-based VPS

1. First Login & Basic Security (Important!)

# Connect to your VPS
ssh root@YOUR_SERVER_IP

# Update system
apt update && apt upgrade -y

# Create new user (instead of using root)
adduser yourusername
usermod -aG sudo yourusername

# Disable root SSH login (Security)
nano /etc/ssh/sshd_config
# Change these lines:
# PermitRootLogin no
# PasswordAuthentication no   (after setting up SSH key)

systemctl restart ssh
    

2. Install LEMP Stack (Nginx + MariaDB + PHP 8.3)

apt install nginx mariadb-server php8.3-fpm php8.3-mysql php8.3-curl php8.3-gd unzip -y

# Secure MariaDB
mysql_secure_installation
    

3. Configure Nginx + PHP

# Create site configuration
nano /etc/nginx/sites-available/yourdomain.com

# Paste this:
server {
    listen 80;
    server_name yourdomain.com www.yourdomain.com;
    root /var/www/html;
    index index.php index.html;

    location / {
        try_files $uri $uri/ =404;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
    }
}
    

4. Install WordPress (Most Common Use)

  1. Download WordPress: cd /var/www/html && wget https://wordpress.org/latest.tar.gz && tar -xzf latest.tar.gz
  2. Move files and set permissions
  3. Create database in MariaDB
  4. Run WordPress installer

5. Essential Security Setup

💡 Pro Tips for 2026

  • Use Contabo VPS 3 (24GB RAM) for best value
  • Always use SSH keys instead of passwords
  • Enable automatic security updates
  • Install caching (Redis or LiteSpeed Cache for WP)

Ready to Launch Your VPS?

Get Best Cheap VPS First →