When you decide to switch from shared hosting to a VPS, the first question you will have is how much RAM and CPU is sufficient while keeping expenses low. I have personally been in this situation. I had to switch from shared hosting, because I just could not stand the 15-30 minute downtime that would occasionally happen.
At the same time I was scared by the $20-$30 price tags I would see on VPS hosting and naturally gravitated towards services like $6/mo 1GB/1vCPU Managed DigitalOcean VPS.
The first thing you need to realize is that the resources used are not dependent on your website traffic.
There are background services running all the time that keep your servers and email services alive even when your website has zero visitors.
Also your WordPress plugins use resources – some of them like Broken Link Checker can push your site well over the limit. A cache plugin set to Automatic Preload cached pages after purging also puts a huge load onto the server.
On the VPS of this website I have the following CentOS server components running:
- Centos Web Panel – the control panel
- Apache – to handle PHP
- Varnish cache – for speed
- NGINX – high load server that receives all incoming requests
- FTP – for file transfer
- MySQL – for database handling
- DNS Server – to handle domains
- SSH – login services
Mail Services Running
There is another set of services that handle mail
- Postfix – to send email
- IMAP/POP3 to receive email
- ClamAV – antivirus
- AMaVis – virus scanner
- OpenDKIM – email authentication signature
- SpamAssasin – spam filter
1GB RAM/1 CPU Insufficient
As I wanted to save money, I went for the smallest/cheapest managed VPS.
$30 for 6 months seemed reasonable. Since I was brand new to a VPS, it was also a great way to get past the learning curve.
My site regularly went offline with this database connection error:
Then the DNS server wasn’t working:
I was having more downtime than on the previous shared server and this also caused my earnings to go down.
I contacted my host and finally got an answer:
We checked log file and come to know that due to low RAM your services get stopped or restarted.
Please feel free to let me know if you have any further questions or notes, as well as if you still need our assistance.
With best regards,
Therefore I upgraded to 2GB RAM and 2 CPUs
I was also getting bursts of high CPU:
The solution to this was to turn off some non-vital services:
The final solution was, in addition to having these services off, to
- find a non-expensive hosting solution
- move to a 2 CPU/8 GB VPS
- Share the costs with 2 other website owners
While your individual configuration may be different, hopefully you can draw ballpark conclusions from the above as to how much RAM & CPU is needed for a WordPress VPS.