If you want to provide a great user experience to your users, your site needs to load fast. Without a fast loading website, your website will not be #1 on Google. If your audience moves away from your website before it is fully loaded – you are not going to get top search engine rankings magically. Slow sites can decrease your business’s conversion rate.
That is why there are thousands of WordPress speed optimization services that exist in the industry. These WordPress speed optimization service providers can cost you a fortune. WordPress speed optimization services can cost you from a mere $25 to thousand bucks depending on the quality, hosting services providers, premium plugins and more. Professional services will always cost you, but they will ensure a great above the fold experience. In this article, we are discussing how you can optimize WordPress speed on your own for free.
Proof that WordPress Speed Optimization Works
Before writing this article, we optimized several sites with some secret and some not so secret pagespeed improvement tips on four of our several sites. The result was astonishing. On average, I saw an almost 2x speed improvement of WordPress page speed.
There are a few sites where you can execute a speed test of your websites
Here’s the speed test results after WordPress speed optimization. All tests were done in GT Metrix.
When put into charts, I saw a massive improvement in before/after loading time.
Best WordPress Speed Optimization Techniques
Optimizing WordPress for speed is not a hard task. But it certainly tests your patience.
One of the main hurdles everyone faces with WordPress speed optimization is consistency. No one magic button will work for all. If some WordPress speed optimization works for you, that does not guarantee it will not for your friend Joe or Smith.
However, you will have all the details of WordPress speed optimization that one needs in this article. Buckle up; it will be a wild ride.
Take Note of The Current WordPress Site Speed
In this case, I saw the page loading speed is almost 10.4MB – which way above the limit.
You can also take a look at Google Page Speed insights which provides useful insights on how you can improve page speed. Google Pagespeed Insights is the desktop first version; If you want to test your site for mobile, Google has another nifty tool known as Google Test My Site
Using a WordPress Hosting Provider
Have you ever heard the word time to first byte (TFFB)? If you have not heard it before, you are not alone.
TTFB is a measurement of responsiveness. People have different opinions on time to the first byte as some say it is not an important factor(Cloudflare) while others say (Ilya Grigorik, Web Performance Engineer at Google) it is essential.
But having a fast hosting provider can load your website up to 2x. A great hosting provider will give you less waiting time on time to first byte.
Kinsta is one of the leading WordPress hosting providers which is famous for its loading time. Kinsta uses their own caching, SSD disk storage and WordPress knowledge to provide you an optimum loading speed.
There are some other great WordPress hosting providers are available too. Bluehost, HostGator are big names in the hosting industry. You could also go with some small but reputable WordPress optimized hosting companies such as Pilvia, Boss Host BD, Closte which are famous for exceptional support and scalability. There are some shared hostings which also provides excellent services. Nevertheless, be sure to check their reviews before choosing your hosting provider.
Minify JS, CSS, HTML
Thankfully, our friends at Themeisle conducted these tests. You can see the results here.
Although they found Fast Velocity Minify to be the best, but we have been a fan of Frank Goossens’s Autoptimize. Mostly because Autoptimize has impressive compatibility with other plugins and themes and generally works well out of the box.
PHP 7 is a lot faster than its previous versions. Just recently, WordPress announced the minimum requirement of PHP is PHP 5.6. However, WordPress performs a lot quicker in PHP 7 and onwards. PHP 7 introduced a massive performance boost.
There is no reason to hold back from using PHP 7. If you have any plugin or theme error for PHP version, we would suggest finding an alternative of those plugins and themes. However, you must upgrade to PHP 7.x
Here is the chart show PHP7 is much better than PHP6 and old version:
Another test conducted by Kinsta found out that PHP 7.3 loads faster than any other PHP version or HHVM.
Testing done by our friends at Kinsta
- WordPress 4.9.8 PHP 5.6 benchmark: 97.59 req/sec
- WordPress 4.9.8 PHP 7.0 benchmark results: 221.42 req/sec
- WordPress 4.9.8 PHP 7.1 benchmark results: 233.78 req/sec
- WordPress 4.9.8 PHP 7.2 benchmark results: 250.36 req/sec
- WordPress 4.9.8 PHP 7.3 benchmark results: 276.31 req/sec ?
PHP 7.3 was the winner, proving to be faster than PHP 7.2. And if you compare PHP 7.3 to PHP 5.6, it can handle almost 3x as many requests per second!
Content Delivery Network distributes your content worldwide. When you use a CDN, the core WordPress files and other web resources of your server (e.g., JS, CSS, images) will be served from the client’s nearest server.
Your audience will load all those resources from their nearest server. This will ensure a fast loading speed of your website.
There are a few CDN providers around the world.
If you are looking for a free CDN, then try WordPress with Cloudflare. Cloudflare is a Content Delivery Network that also provides many useful features like DNS Manager, HTTP/2, free SSL and more.
WordPress Caching Plugins Can Improve Your WordPress Speed
Caching is very important to maintain a fast loading website.
What is caching?
Caching is a way of memorizing your most frequently used data so the system does not have to send queries to represent those data.
Cached pages will load much faster because the server does not send a new query to to your server. No database queries, no PHP queries, and fewer HTTP requests mean an instant gain in page speed tests. All web pages are served from saved resources. Thus eliminating the need of database queries and PHP functions.
Take a look at 8 best WordPress caching plugins to choose your favorite WordPress caching plugin. You can use any of the WordPress caching plugins mentioned in the article. For example, if you are using Litespeed server you can try litespeed cache to take the most advantage of your server.
Did you know caching plugins can optimize WordPress speed upto 3x?
You should optimize your database table to eliminate all the revisions, trash comments, pingback, and additional data. These data can increase over time and slow down your website.
WP-Optimize is a great free plugin which can automatically clean post revisions, auto drafts, trash posts, spam comments, pingbacks and transient options from your database. [We also covered the plugin in our annual list of the best WordPress plugins]
Enable Gzip Compression/Brotli Compression
Gzip compression serves a compressed version of your website to browsers. Compressing allows your website to have a smaller footprint. Gzip compression can significantly reduce your WordPress page size.
Gzip compression can make your website almost 50% faster
Check GZIP Compression Tool
You can check if your website is already gzip compressed or not with the website https://checkgzipcompression.com.
If your hosting company does not serve gzip compressed version of your pages by default, you can manually enable it from your
.htaccess.Just paste the following file to your
.htaccess file to enable gzip compression
Important: take a backup of your current .htaccess file so that you can always revert back if your server does not support it.
Enable Brotli Compression with Cloudflare
Brotli is the next-generation compression technique. Brotli compresses even more than Gzip. You can use Cloudflare to enable Brotli compression.
Brotli can compress almost 20% more than Gzip
- Brotli compressed JS is 14 percent smaller than Gzip.
- Brotli compressed CSS are 17 percent smaller than Gzip.
- Brotli compressed HTML files are 21 percent smaller than Gzip.
Upload Compressed & Resized Images
If you upload a 10MB image file directly to your article, you can never expect a fast loading website. Large images take more time to load. That is why image compression is an excellent technique to reduce file sizes of images. You can compress your images by choosing from plenty of online image optimization services.
Never upload any images larger than 1600px (width) on your WordPress website. There are many free image resizers. One such image resizer is PixResizer which works offline. The most popular online image resizer is TinyPNG.
Use A WordPress Image Optimization Plugin
If you do not want to resize and optimize each image before uploading – there are a couple of server-side image optimization plugins available. These plugins will optimize your images when you upload them and make sure your website is consistently serving optimized images.
- Smush Image Compression and Optimization – You can resize, optimize and compress all of your images (including existing images from your library) using the powerful Smush Image Compression and Optimization plugin. The plugin has 1 million+ users – so you can’t go wrong with it.
Lazy Load Images
Lazy Loading means the images will only load when users scroll to that point of the article. If your image is not viewable from the viewport, it will not be displayed.
You can lazy load images to ensure images do not block the page from loading. Lazy loading provides users a great experience as an audience do not have to wait for images to load while seeing text-based content.
You can enable lazy loading from Jetpack Settings
Do Not Use More Plugins Than You Need
Plugins are awesome, right? They all provide great functionalities.
My five years of WordPress experience says that the less number of plugins you use, the better your WordPress site performs.
You can check our list of the best WordPress plugins to get familiar with some of the most used and beloved WordPress plugins.
Since January 2018, Google has been using page speed as a search metric to rank websites on mobile search.
The “Speed Update,” as we’re calling it, will only affect pages that deliver the slowest experience to users and will only affect a small percentage of queries. It applies the same standard to all pages, regardless of the technology used to build the page. The intent of the search query is still a very strong signal, so a slow page may still rank highly if it has great, relevant content.
We have mentioned the most crucial WordPress speed optimization tips above. Here are some more small tweaks you can apply to gain even faster-loading speed.
- Optimize all JPEG, PNG and GIF file sizes
- Delete unused theme thumbnails
- Scale images to sizes used in your website
- Enable browser cache
- Enable lazy image loading
- Stop wp-cron.php if not used
- Stop admin-ajax.php if not used
- Define long expire dates for static files
- Enable image hotlink protection
- Check if unused PHP is removed
You may also be interested in 10 Ways to speed up WordPress with some other techniques.
Last Updated on