01
VPS or web hosting?
For a showcase site or a WordPress, web hosting does everything for you: server, updates, certificate, e-mail. A VPS becomes worthwhile for a custom application, several sites with different needs, reserved resources or software that web hosting does not offer. The guide web hosting or VPS details the choice.
02
Pointing the domain at the VPS
In your domain name's DNS zone, create an A record for @ (the bare domain) and one for www, pointing to the VPS's IPv4 address. Propagation takes from a few minutes to a few hours; dig +short your-domain.com shows when the address is right.
03
Installing Nginx
sudo apt update && sudo apt install -y nginx
sudo ufw allow 'Nginx Full'
sudo mkdir -p /var/www/your-domain.com
Then create the site configuration, /etc/nginx/sites-available/your-domain.com:
server {
listen 80;
server_name your-domain.com www.your-domain.com;
root /var/www/your-domain.com;
index index.html index.php;
location / {
try_files $uri $uri/ =404;
}
}
sudo ln -s /etc/nginx/sites-available/your-domain.com /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
nginx -t checks the configuration before loading it: get into the habit of running it after every change.
04
Adding PHP if the site needs it
For WordPress or any PHP site, install PHP-FPM (sudo apt install -y php-fpm php-mysql, plus the extensions your application asks for), then add to the server block:
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php-fpm.sock;
}
A database (MariaDB or PostgreSQL) installs the same way. It must listen locally only, never on the public address.
05
Free HTTPS with Let's Encrypt
sudo apt install -y certbot python3-certbot-nginx
sudo certbot --nginx -d your-domain.com -d www.your-domain.com
Certbot obtains the certificate, changes the Nginx configuration for HTTPS and can redirect all HTTP traffic to HTTPS. It also sets up automatic renewal: sudo certbot renew --dry-run checks that it will work.
06
Several sites, and upkeep
- Several sites: one configuration file and one folder per site, each with its own
server_name and certificate.
- Updates: enable automatic security updates for the system, and keep the application itself up to date (WordPress, plugins, dependencies).
- Backups: site files and a database export, copied off the VPS every night.
- Security: SSH login by key, firewall limited to the ports you need, and the guide securing a Linux VPS.
07
On a CloudFive VPS
Our VPS are in France, with a dedicated IP address, root access and anti-DDoS protection included: the Ryzen VPS on Ryzen 9 9950X and NVMe for most sites, the Intel VPS, our cheapest VPS, for a modest site. The domain name is registered from the same customer area, with free DNS.
08
Frequently asked questions
Can several sites be hosted on one VPS?
Yes: with Nginx, each site has its configuration file, its folder and its HTTPS certificate. The number of sites depends mostly on memory and traffic.
Is the HTTPS certificate paid on a VPS?
No. Let's Encrypt issues free certificates, and Certbot installs and renews them automatically.
Nginx or Apache for a VPS?
Both work. Nginx is light and widely used as a web server and reverse proxy; Apache remains useful if your application relies on .htaccess files.
Do I need a VPS for a WordPress site?
Not necessarily: web hosting is enough for most WordPress sites, with nothing to administer. A VPS is justified for high traffic, special needs or several applications.