How do you host a website on a VPS?
Buy a Linux VPS, point your domain's A record at its IP address, then install a web stack. The easy route is a control panel: CyberPanel is free, cPanel and Plesk are paid add-ons, and each adds the site, installs WordPress and issues free SSL from a dashboard. The hands-on route is Nginx, PHP-FPM and MariaDB over SSH, with Certbot for HTTPS. Then open only the ports you use (22, 80 and 443, plus your panel's login port) and keep backups off the server.
Below are both routes on a RapidServer KVM VPS in Mumbai (BOM1) or Delhi NCR (DEL1). Using a VPS for website hosting means you run the server yourself; for the general steps on any kind of hosting, read how to host a website.
What you need first
- A domain name from any registrar. It stays there; you only change its DNS records.
- A Linux VPS. This guide uses Ubuntu 24.04 LTS. cPanel and CyberPanel run only on Linux. To pick the size, read how much VPS you need.
- A city near your visitors. Mumbai (BOM1) for western and southern India, Delhi NCR (DEL1) for the north, including Noida and Gurugram. Both cost the same.
- An SSH client to log in as root. New to it? Read SSH kya hai.
A RapidServer VPS is usually ready a few minutes after payment, with its IP address and login in the client area.
With a control panel or without one?
A control panel is a web dashboard for sites, databases, mail and SSL; without one, you use commands over SSH.
| On our VPS | Best for | |
|---|---|---|
| CyberPanel | Free | Your own WordPress and PHP sites, on OpenLiteSpeed |
| cPanel & WHM | ₹1,499/mo | Client sites in separate accounts, or moves from cPanel hosting |
| Plesk Web Pro | ₹1,099/mo | Linux or Windows, with WP Toolkit for WordPress |
| No panel (LEMP) | Free | Developers who want the lowest overhead and full control |
Panel prices are monthly, added to the VPS, and exclude 18% GST. A panel also uses some RAM and disk itself. The full comparison is in cPanel vs Plesk vs CyberPanel.
Point your domain at the VPS
Both routes start here, because free SSL is issued only once the domain reaches your server. At your registrar or DNS provider (see DNS kya hai), either:
- Add A records, the simplest way: point
@andwwwat the VPS's IPv4 address, and add AAAA records only if the site will answer on IPv6. Email records such as MX stay untouched. - Or change the nameservers to the panel's DNS server, so the panel holds every record. This needs nameserver names registered at your registrar, and you must recreate MX, SPF and DKIM records first or email breaks.
An A record takes effect within minutes to hours, depending on its TTL; a nameserver change can take up to 24–48 hours. Check with dig +short example.com.
Path A: host a website with a control panel
- Pick the panel when you order. In the VPS configurator, choose CyberPanel, cPanel & WHM or Plesk Web Pro after the system, image and city, so the server is built with it. CyberPanel needs Ubuntu or AlmaLinux.
- Add the site. In CyberPanel, click Create Website and enter the package, owner, domain, admin email and PHP version; leave Create Mail Domain off if email is hosted elsewhere (CyberPanel's guide). In WHM, create a cPanel account for the domain; in Plesk, add the domain.
- Install WordPress. In CyberPanel, open Websites, List Websites, Manage, then WordPress under Install Application (auto installers); its newer Deploy WordPress tool needs a paid add-on licence, per its docs. In Plesk, go to WordPress and click Install: WP Toolkit is free with Web Pro. In cPanel, use WP Toolkit if the server has it, or upload WordPress in File Manager and create its database under MySQL Databases.
- Issue free SSL. Once DNS resolves and ports 80 and 443 are open, CyberPanel gets a Let's Encrypt certificate from Security, Manage SSL, Issue SSL (steps). cPanel's AutoSSL and Plesk's built-in Let's Encrypt do the same job.
- Check the site on
https://and switch on the panel's scheduled backups.
Path B: Nginx, PHP-FPM and MariaDB without a panel
LEMP is Linux, Nginx, MariaDB and PHP. Our LAMP/LEMP (PHP 8.3) and WordPress (LEMP + Redis) images save some of these steps; below is the manual way on a clean Ubuntu 24.04 LTS image, as root. Set up SSH keys first: see how to secure SSH.
1. Open the firewall
Allow SSH before you switch ufw on, or you lock yourself out (firewall kya hai):
ufw allow OpenSSH ufw allow 80,443/tcp ufw enable
2. Install Nginx, PHP-FPM and MariaDB
apt update && apt upgrade -y apt install nginx mariadb-server php-fpm php-mysql php-curl php-gd php-intl php-mbstring php-xml php-zip mariadb-secure-installation
On Ubuntu 24.04, php-fpm installs PHP 8.3; WordPress recommends PHP 8.3 or later and MariaDB 10.11 or later. mariadb-secure-installation removes anonymous users, remote root logins and the test database.
3. Create the database
Run mariadb, then:
CREATE DATABASE wordpress CHARACTER SET utf8mb4; CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'change-me-long-random-password'; GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost'; EXIT;
4. Put the site files in place
cd /tmp && wget https://wordpress.org/latest.tar.gz tar -xzf latest.tar.gz mkdir -p /var/www/example.com cp -a wordpress/. /var/www/example.com/ chown -R www-data:www-data /var/www/example.com
These steps follow WordPress's install guide. For a plain HTML or PHP site, upload your files over SFTP instead.
5. Add an Nginx server block
Create /etc/nginx/sites-available/example.com:
server {
listen 80;
listen [::]:80;
server_name example.com www.example.com;
root /var/www/example.com;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
}
}
Switch it on and reload Nginx:
ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/ nginx -t && systemctl reload nginx
The try_files line is from WordPress's Nginx guide; the PHP block hands .php requests to PHP-FPM, as in nginx.org's PHP example. Check the socket name with ls /run/php/.
6. Free SSL with Certbot
With DNS pointing at the server and port 80 open, install Certbot as certbot.eff.org recommends, after removing any Certbot installed with apt. It gets a free Let's Encrypt certificate, adds HTTPS to the server block and renews it automatically:
snap install --classic certbot ln -s /snap/bin/certbot /usr/local/bin/certbot certbot --nginx -d example.com -d www.example.com certbot renew --dry-run
7. Finish the WordPress install
Open https://example.com, enter the database details from step 3, then a site title and an admin account with a strong password.
Backups and updates
Every RapidServer VPS includes daily backups kept for 7 days, plus snapshots on demand to take before big updates. Keep your own copy off the server too. Panels have scheduled backups; without one, save these lines as /root/backup.sh, run it nightly from cron and copy the files elsewhere:
mkdir -p /root/backups mariadb-dump wordpress > /root/backups/wordpress-$(date +%F).sql tar -czf /root/backups/site-$(date +%F).tar.gz -C /var/www example.com
Run apt update && apt upgrade weekly or switch on unattended-upgrades, and keep WordPress and plugins current. Site slow? See how to improve VPS performance.
When shared hosting is still the better choice
VPS web hosting makes you the server admin: every VPS is unmanaged by default, so updates, security and backups are your job (managed vs unmanaged VPS). For one small site, or with no server skills, shared hosting is simpler and cheaper: our web hosting is cPanel on LiteSpeed and NVMe in Mumbai with free SSL, business email and automatic backups, and there is WordPress hosting for WordPress sites.
Take a VPS for several busy sites, root access, Node.js or Docker, or a server in Delhi NCR, since web hosting runs only in Mumbai. Outgrow shared hosting later and we move the site to a VPS at no cost, crediting your unused balance.
Moving an existing site to the VPS
Build and test the site on the VPS while the old host keeps serving visitors, then lower the TTL and switch the A record; shops need a final database sync first. The full method is in how to migrate a website without downtime. A full cPanel backup restores on almost any other cPanel server, or we move the site to your RapidServer VPS from any host for free: request a free migration.
Dedicated vCPU, NVMe and full root in Mumbai or Delhi NCR, with CyberPanel free or cPanel and Plesk as add-ons, ready a few minutes after payment, from ₹581/mo plus GST.
See VPS plans