Complete Beginner’s Guide to Deploying Your First Website on VPS in 2026

ℹ️

Disclosure: This article may contain affiliate links. If you purchase through these links, we may earn a small commission at no additional cost to you. All reviews are independently written and opinions remain unbiased.Learn more →

📢Limited Offer — Vultr Free Credit Up to $300! Claim →

💡 Summary

  • Bought a VPS but don’t know what to do next? This tutorial walks you through the entire process in seven simple steps, from server connection to website launch, and includes every command you need to run.
  • No prior server operation and maintenance experience is required to follow along.
💡
💡

Hostinger — Editor's Pick

Get the best price through our exclusive link and support our reviews.

Explore Hostinger

After buying a VPS, most new users run into the same problem: they want to build a website but have no clear idea where to start. This tutorial splits the entire WordPress deployment into seven simple, follow-along steps with every command you need. Just copy and run them, and you’ll have a fully working website live by the end.


Step 1: Create your VPS server

Sign up with Vultr, DigitalOcean, or Hostinger and deploy a server using these specs:

ParameterRecommended choice
CPU / Memory1 core / 2GB RAM (minimum)
Storage40GB SSD or more
Operating systemUbuntu 22.04 LTS
Node locationClosest data center to your target audience

Once created, copy down your public VPS IP address — you’ll need it for every next step.


Step 2: Connect via SSH & update system

Mac and Linux use the default terminal; Windows use PowerShell or PuTTY:

ssh root@your_server_IP

Type yes to confirm the server fingerprint, then enter your root password to log in.

First thing after login, update all system packages:

apt update && apt upgrade -y

Step 3: Install Nginx web server

Nginx is lightweight, high-performance, and perfect for running WordPress:

apt install nginx -y
systemctl enable nginx
systemctl start nginx

Now open your VPS IP in a browser. If you see the default Nginx welcome page, installation is successful.


Step 4: Install MySQL, PHP & WordPress

Install MySQL database first:

apt install mysql-server -y
mysql_secure_installation

Log into MySQL to create a database and user for WordPress:

mysql -u root -p

Run these SQL commands line by line, replace your_password with a strong password:

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

Install PHP and required extensions for WordPress:

apt install php php-fpm php-mysql php-xml php-curl php-gd php-mbstring -y

Download and install WordPress into your web root folder:

cd /var/www/html
wget https://wordpress.org/latest.tar.gz
tar -xzf latest.tar.gz
mv wordpress/* .
rm -rf wordpress latest.tar.gz
chown -R www-data:www-data /var/www/html

Edit Nginx config to support PHP:

nano /etc/nginx/sites-available/default

Find the index line and edit to:

index index.php index.html index.htm;

Find the PHP location block and make it:

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

Save and exit nano, then restart Nginx:

systemctl restart nginx

Visit your VPS IP in browser — you should see the WordPress installation wizard ready to go.


Step 5: Point domain name to your VPS

Go to your domain registrar’s DNS panel (Cloudflare, Namecheap, Porkbun etc.), add two A records:

Type: A
Hostname: @
Value: your VPS IP
TTL: 3600

Type: A
Hostname: www
Value: your VPS IP
TTL: 3600

Wait a few minutes to a few hours for DNS to propagate. You can test with ping yourdomain.com on your local terminal.

Edit Nginx config to add your domain:

nano /etc/nginx/sites-available/default

Change server_name line to:

server_name yourdomain.com www.yourdomain.com;

Restart Nginx:

systemctl restart nginx

Step 6: Install free SSL HTTPS with Certbot

HTTPS is required for modern websites and good for SEO. Install Certbot:

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

Follow the prompts to enter your email and agree terms. Certbot will auto-install SSL and update Nginx config.

Test automatic renewal to make sure it works:

certbot renew --dry-run

Let’s Encrypt auto-renews, no manual work needed later.


Step 7: Basic VPS security setup

Set up firewall only allowing necessary ports:

ufw allow ssh
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
ufw status

Install Fail2ban to block brute-force SSH attacks:

apt install fail2ban -y
systemctl enable fail2ban
systemctl start fail2ban

Optional: Change default SSH port to reduce scanner attacks

nano /etc/ssh/sshd_config

Uncomment and change:

Port 2222

Update firewall and restart SSH:

ufw allow 2222/tcp
ufw delete allow ssh
systemctl restart sshd

Next time connect with:

ssh -p 2222 [email protected]

Common troubleshooting tips

• Can’t open Nginx page: Check systemctl status nginx and confirm port 80 is open in UFW

• WordPress database error: Double-check database name, username, password during WP install

• Certbot SSL failure: Make sure DNS already points to your VPS IP and port 80 is open

• 2GB VPS capacity: Can run 3–5 low-traffic WordPress sites stably


Full process timeline

StepActionEstimated time
1Purchase & create VPS2 minutes
2SSH login & system update2 minutes
3Install Nginx1 minute
4Install MySQL, PHP & WordPress5 minutes
5Domain DNS setup2min + DNS wait
6HTTPS SSL configuration2 minutes
7Firewall & security hardening3 minutes

Following these exact steps, you can go from a blank VPS to a fully secured WordPress site with HTTPS in under 20 minutes. If you hit any error, just copy the message and search it — nearly every beginner issue has a ready solution online.

🚀

Ready for Hostinger? Now is the perfect time

Use our exclusive link for the best price — and help support our content.

← Previous
Top 10 Must-Have Tools for VPS Beginners in 2026 – Practical Server Management Guide
Next →
Best Cheap VPS in 2026: High-Value Options Under $3 Per Month

🏷️ Related Keywords

💬 Comments

150 characters left

No comments yet. Be the first!

← Back to Articles

VPS Rankings focuses on VPS selection, bringing together provider reviews, rankings, practical tutorials, performance benchmarks, and deal roundups. Complete your entire journey — from research and comparison to purchase — in one place. Whether you need budget web hosting, overseas cloud servers, or want to compare specs, routing, and pricing across providers, we make the decision easier. We also maintain long-term coverage of CN2 GIA, low-latency Asia routes, and other optimized solutions tailored for China-facing networks and cross-border businesses, and continuously update VPS recommendations, hands-on guides, and deal collections to help you make faster, more informed choices.