VPS hosting vs shared hosting: what suits you?
---
Requirements
Before you make a choice, you will need the following:- A domain name that you want to link to the hosting.
- Access to the control panel of your current hosting provider (if you are switching).
- Basic knowledge of SSH and Linux commands if you choose an unmanaged VPS.
- A backup of your website files and database before migrating.
What is shared hosting?
Shared hosting means that one physical server is shared by dozens to hundreds of websites. The provider distributes CPU, RAM, and storage among all users. You work within a fixed framework: a control panel such as cPanel or DirectAdmin, with which you upload files, create databases, and configure email accounts. You have no access to the kernel, no root privileges, and you cannot install your own software that falls outside the control panel.The resources are not guaranteed. If another website on the same server gets a traffic spike, or if a memory leak occurs in a PHP script from a neighbor, you will notice it in slow loading times. This is called the "noisy neighbor" effect. The provider can limit this with cgroups or CloudLinux, but the isolation is never complete.
Shared hosting starts at around €1.00 per month, with typical packages between €5 and €15 per month. This is the cheapest way to get a website online.
---
What is a VPS?
A VPS (Virtual Private Server) is a virtual machine that runs on a physical server, isolated via a hypervisor such as KVM or Proxmox. You get a guaranteed portion of the resources allocated: a fixed number of CPU cores, a fixed amount of RAM, and your own storage partition. Other virtual machines on the same hardware cannot use your resources.You get root access to your own Linux system. That means you choose the operating system (for example Ubuntu 24.04 LTS, Debian 12, or AlmaLinux 9), configure the kernel, set up your own firewall with iptables or nftables, and install software that is not possible in a shared environment — such as Docker, Kubernetes, or your own mail server.
The price starts around €5 to €20 per month for an entry-level model with 1-2 GB RAM. A VPS with 2 to 4 GB RAM costs about €15 to €30 per month and can handle roughly 100,000 visitors per month, depending on the optimization of your application.
---
Steps: migrating from shared hosting to a VPS
If you are switching from shared hosting to a VPS, follow these steps.Step 1: Choose a VPS provider and order a server
Choose a provider that uses KVM virtualization and offers a modern Linux distribution. Order a VPS with at least 2 GB RAM and 2 vCPU cores. Note the IP address, the root password, and the SSH port number that your provider gives you.
Step 2: Make a backup of your current website
Make a full backup of your files and database. Via SSH on your shared hosting:
tar -czf website-backup.tar.gz /path/to/your/website
mysqldump -u username -p databasename > database-backup.sqlStep 3: Connect to your VPS via SSH
ssh root@your-vps-ip-address
Change the root password immediately:
passwd
Step 4: Update the system and install a web server
On Ubuntu 24.04 or Debian 12:
apt update && apt upgrade -y
apt install nginx mariadb-server php-fpm php-mysql -yStep 5: Upload your website files
Use `scp` from your local machine:
scp website-backup.tar.gz root@your-vps-ip-address:/var/www/
On the VPS:
cd /var/www
tar -xzf website-backup.tar.gzStep 6: Import the database
mysql -u root -p < database-backup.sql
Step 7: Configure Nginx
Create a virtual host in `/etc/nginx/sites-available/your-domain`:
server {
listen 80;
server_name yourdomain.nl www.yourdomain.nl;
root /var/www/your-website;
index index.php index.html;</p><p>location / {
try_files $uri $uri/ =404;
}</p><p>location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
}
}Activate the site and restart Nginx:
ln -s /etc/nginx/sites-available/your-domain /etc/nginx/sites-enabled/
systemctl reload nginxStep 8: Configure a firewall
ufw allow OpenSSH
ufw allow 'Nginx Full'
ufw enable---
Verification
Check whether your website runs correctly on the VPS:curl -I http://yourdomain.nl
systemctl status nginx
systemctl status mariadbThe first command should return an HTTP/1.1 200 OK header. The second and third should show "active (running)".
---
Frequently asked problems
Problem: The website loads but the database does not workCheck whether MariaDB is running and whether the database user has permissions on the imported database:
systemctl status mariadb
mysql -u root -p -e "SHOW DATABASES;"Problem: SSH connection is refused
Check whether the firewall has port 22 open. If you enabled `ufw` before allowing SSH, you must log in via your provider's console and run:
ufw allow OpenSSH
Problem: PHP scripts are downloaded instead of executed
The Nginx configuration refers to the wrong PHP-FPM socket. Check which PHP version you have and adjust the socket in the configuration file:
ls /run/php/
---
When shared hosting is the right choice
Shared hosting is suitable for websites with little traffic and no specific technical requirements. A blog, portfolio, or small webshop with fewer than tens of thousands of visitors per month runs fine on a shared server. You don't need SSH access, no knowledge of server configuration, and the provider handles updates and security. The downside is that you have no control over the environment — if you later need specific software, or if your site grows, you will hit the limits.---
When VPS is the right choice
VPS is the choice when you need more than a control panel. Websites running on Node.js, Python, or a custom application require root access. If you run multiple websites with different requirements, or if you want to use Docker containers, then a VPS is the minimum basis. Also, if you expect traffic numbers from tens of thousands to hundreds of thousands of visitors per month, a VPS offers the stability that shared hosting cannot guarantee.Managing an unmanaged VPS requires knowledge of Linux, networking, and security. If you don't have that knowledge, choose a managed VPS — the provider then handles updates, monitoring, and basic security, but you pay more. The freedom of a VPS also means responsibility: a misconfigured firewall takes your entire site down, and an unsecured SSH port invites brute-force attacks.
---
The costs in perspective
VPS is more expensive than shared hosting, but the comparison is not fair if you only look at the monthly price. Shared hosting from €1 per month seems attractive, but you pay with limitations: no root access, no guaranteed resources, and no ability to install software that falls outside the control panel. A VPS of €15 per month offers a full Linux system on which you can run anything you would run on a physical server.The real costs are in your time. An unmanaged VPS costs hours of configuration and maintenance. If you don't have that time, a managed VPS or good shared hosting with CloudLinux isolation is a wiser choice.
The boundary between shared hosting and VPS is not just a matter of budget — it is a boundary between an environment you manage and an environment that manages you. As soon as you need root access, the choice is made. The only question is when you need it: now, or after the first traffic spike that your shared server cannot handle.