Zac Scott

๐Ÿง‘โ€๐Ÿ’ป Web Engineer ๐Ÿ“… Project Manager  ๐ŸŽฏ Leader


Is it possible to reliably and efficiently run a WordPress site on a cheap virtual private server (VPS)? Yes, it is! In this blog post, we will discuss how to run a WordPress site on minimal hardware.

While there are many options for cheap virtual private servers in the market, we recommend using Vultr for their pricing and reliability. At the time of writing, Vultr offers a $2.50 USD per month VPS with 1 vCPU and 512MB, which is sufficient for running a basic WordPress site.

There are a few tricks to getting this to work of course.

Use SQLite. MySQL is too resource-intensive to run reliably on a small server, so I recommend using SQLite as an alternative. Although it is not yet part of WordPress core, SQLite is supported through a feature plugin.

Leverage Cloudflare edge caching. Cloudflare will cache your site at the edge for free! Yes, free. I have written a blog post on how to configure this for WordPress here:

Optimise WordPress. WordPress includes a lot of bells and whistles which you can probably do without. Disabling things like the built in search functionality and XMLRPC can greatly increase performance capability and security of your site. I have actually built a lightweight plugin which makes it easy to disable these superfluous features, Just Disable It.

It goes without saying of course, limit the plugins you use as well. Plugins quality and server requirements vary greatly, it is best to stick to a small set of core plugins.

Add object caching. WordPress includes an object cache, which caches database queries, which can speed things up significantly. On a small, single server, it is best to use APCu based object cache.

Optimize PHP. Since we’re working with minimal hardware, PHP also needs to behave in a minimalistic way. Limit memory usage to a maximum of 32MB and limit upload sizes so that we don’t exceed our tiny 512MB RAM budget. Set the php.ini configuration like so:

memory_limit = 32M

max_file_uploads = 1
post_max_size = 4M
upload_max_filesize = 4M

Optimize PHP-FPM. If you’re using Nginx, you can optimize the number of PHP-FPM servers that will run to serve requests. If we allocate at most half our RAM budget to PHP (256MB) and our PHP memory limit is 32MB, we can handle 8 concurrent requests. We don’t really want more concurrency than around 2-4 threads anyway with a single vCPU. So a configuration like so makes sense:

We can optimise PHP-FPM to have at most 4 concurrent processes by configuring it like this:

listen.backlog = 32

pm = static
pm.max_children = 4
pm.start_servers = 4
pm.min_spare_servers = 4
pm.max_requests = 100

Finally, make sure you have swap space enabled. With such a tight RAM budget, it’s best to give the server some room to move with a swap file. There are plenty of guides on how to set up a swap file online.

How performant and reliable is this setup? Surprisingly so. This site is actually running with this very configuration and has been very reliable. As you can see from my status page, it has had perfect uptime over the last three months!


Web engineer with 10+ years experience in solutions architecture, Agile project delivery and leading engineering teams.