WordPress speed optimization doesn’t have to be hard. You can improve the performance of WordPress dramatically, by getting the essentials right. In this short best practices guide, I’ll show you exactly how to optimize WordPress speed, quickly and without much effort.
1. Use the Fastest WordPress Hosting Provider
Website speed is tied to a number of things. These are the number of HTTP request the browser makes to the web server, response times, and the size of the code, scripts, and content that’s fetched. Logically, the speed at which the webserver can process those requests also depends on the hardware and the physical distance between the web browser and the server.
Note: the internet is riddled with articles and guides about (supposedly) the ‘fastest WordPress hosting’. Understand that most of those posts will just list a top 10 list of ‘best WordPress hosting providers’, based on how much commission they can get from a sale.
The performance of your WordPress website depends on many things, including hardware specifications, location of your server in relation to the audience you’re trying to reach, the number of CPUs and memory (of your webserver), and a plethora of other things
For example, in most articles fail to mention from which locations they were ‘testing’, how heavy the loaded images are, which plugin was installed, which PHP version is used, what web server (Nginx or Apache) is serving your pages, how many database calls were made (and I could go on).
Do not be fooled by those ‘best WordPress Hosting provider’ top 10 lists, where almost none of the points mentioned earlier are discussed. I can definitely recommend going with a fast VPS cloud provider, that allows you to scale up your hardware if more performance is needed. That way, you don’t pay for what you don’t need.
2. Get the Fastest WordPress Theme – Astra Pro
Using a speedy theme for your site is essential. A professionally coded, lightweight theme, can reduce load times dramatically. It’s important to choose a theme, which makes it easy to build a professional-looking WordPress site while sacrificing as little as possible in performance.
I use Astra Pro for all my client’s web sites, as well as my own projects. It’s know to be the fastest theme for WordPress. Astra theme comes in two flavors, namely the free version and a Pro version. Where the free version is limited, the Pro version offers options for customization, such as page design, header design, and custom layouts.
Note: a number of WordPress themes claim to be the ‘fastest WordPress theme’. In the end, no single WordPress theme can honestly claim this fact. The reason is that the speed of your WordPress site depends on all of the factors (listed in this article) put together. You could have the fastest WordPress theme ever installed, yet, it’s easy to destroy performance by neglecting all other important points.
3. Always use a Caching Plugin
4. Take advantage of a CDN
A content delivery network is a service that will store your content on their servers in order to serve it to your visitors. These servers can be located anywhere in the world. This is similar to regular caching. The difference is that visitors can be served content from a server that is closer to their own geographical location. This relieves stress on your web hosting server and can hugely improve load times.
There are a number of good CDN services available, which is why choosing can be difficult. If you have a website that receives a lot of traffic, I recommend going with a paid service like StackPath (formerly MaxCDN). They have servers around the world and support is phenomenal. If you have a smaller website, or you’re on a budget, you can definitely get away with a free CDN service such as Cloudflare.
5. Implement Selective Asset Loading
Another effective optimization technique I use is loading scripts only on the pages that need them. If you take a look in the chrome developers console (ctrl + shift + i), under the ‘network tab’, you can see which scripts are loaded on a web page (hit refresh if you don’t see anything). The waterfall also shows you how long it took for those scripts to be loaded. If you don’t need that particular script on that specific page, it means that it’s slowing it down for no reason.
I use the Asset Cleanup plugin in order to selectively load scripts on specific pages. This way you can decide that specific scripts that you don’t want to be loaded on certain pages of your website, won’t be requested. This can drastically improve the load times. Be sure, however, to not disable scripts that are necessary for the functionality of your pages.
6. Use Image Compression
Images are usually the heaviest pieces of the loaded content. More than often I see that the use of heavy images is the reason for slow loading times. By using compression, the requested images are reduced in size, without sacrificing too much quality. This, in turn, reduces strain on your web server and improves load times.
My choice for WordPress Image compression is Optimole. I recommend this service because they’re a one-stop solution, meaning there’s not set up hassle. The plugin is very easy to set up and you can start experiencing better performance instantly. Optimole also serves your images through a CDN, which improves speed even more.
7. Minimize Installed Plugins
Every plugin uses resources. Think about CPU processing power for HTTP requests, database calls or reading files from the SSD. Again, this comes at a cost, namely performance. Through some plugins are more lightweight than others, it’s best practice to remove the ones you don’t need. Not only will this free up resources and make WordPress Faster, but also decrease potential incompatibilities.
How do you know which plugins are negatively affecting performance? Very simple. You can switch off the plugins that are installed one by one and test performance with, and without the plugin activated. In order to asses performance, you can use the tools provided at the end of this article. Finally, you decide if the plugin is important enough to keep, or that you will search for a better alternative.
Note: even the ‘best WordPress plugins’, like for example WooCommerce (yes, you’ll also find many ‘best WordPress Plugins’lists on the web) will affect your web site performance. There’s no such thing as the ‘best WordPress plugin’.
8. Always use the best PHP / MySQL versions
PHP 7.x is at least twice as fast as PHP 5.x. If you want WordPress to be fast, it’s important to use the latest version. Web hosting providers will allow you to select your preferred versions for PHP and MySQL in the admin panel (cPanel, or whatever they are using). Always make sure to select the latest (but stable) versions. Also, remember to first check used plugins to support the selected version.
9. Keep your WordPress Database Optimized
The WordPress database can get clogged with information that’s unnecessary and reduces performance. I’m talking about unused post revisions, spam comments, orphaned metadata and so on. These pieces of data are not needed and can be removed safely using a database optimization plugin.
I use WP-Sweep to optimize my WordPress databases. It allows me to clean up the database from unwanted data with just 1 click. This, in turn, reduces the size and increases the performance. From all database cleaning plugins, I’ve found WP-Sweep to be the most effective.
How to Check Site Performance
Always check the performance of your site, before and after making an optimization. I use a number of tools for this, namely GTmetrix, Pingdom, and Pagespeed insights. Don’t get too concerned with all the information you are served. In the end, the most important metric is the one that tells you how long it takes to load the site.