This is an updated article for optimising WordPress in 2021. This is not a one size fits all solution but these tips work extremely well for me. WordPress is always going to be a performance hog especially if you are using a theme with a built-in page builder. These themes are notorious for suffering from code bloat and the solutions below should limit many of the performance bottlenecks.
Get rid of Cloudflare unless you want to pay for a business plan.
I no longer use Cloudflare as it now seems to slow down my sites unless you are using their business plan. The reason for this is that Cloudflare decided to route most Australian traffic on their free tier plans through international servers. Some of which are as far away as America and Singapore.
Choose a Webhost that utilises Litespeed technology.
LiteSpeed is a leading high-performance and high-scalability web server technology. It also utilises built-in anti-DDoS capability which was one of the areas I missed when I stopped using Cloudflare. It’s blisteringly fast.
Use next-generation image formats like WebP.
WebP is a new image format created by Google. It utilises a more aggressive and superior compression algorithm than JPG and PNG to reduce file sizes with minimal loss of clarity. This means that pages will load faster. That makes both your site’s visitors happy as well as Google as they reward fast websites over slow ones in their search rankings.
Download and install Litespeed cache from the WordPress Repository.
There are dozens of caching plugins to choose from however the LiteSpeed cache plugin communicates directly with the LiteSpeed server. This means the server stores static snapshots of the pages on your WordPress site which gives a massive performance boost. The plugin also has a built-in free CDN called Quic.cloud which I’ve found to be very effective. It will also create WebP versions of your images.
Make sure you are using the latest version of PHP.
Currently, the latest version is 7.4 at the time of writing. This will give you both speed and security improvements. It’s also worth activating Memcache and OPcache in the PHP selector. Memcache is really useful for reducing your database load and OPcache is great for saving execution time when scripts are compiled.
Use the plugin WP-Optimize.
This is a great plugin for tidy up your database which can get bloated over time. Your database stores all the information you need to run your site as well as many things that you don’t. This handy plugin dumps all of this unnecessary data, cleans up your tables and you’ll regain space lost to data fragmentation. Don’t forget to install updraft back up so you can revert to a previous version if anything goes wrong. I haven’t needed to revert due to corruption but it’s peace of mind.