How to Speed Up WordPress? is a mostly asked question. There is a number of different approaches which you can employ to get the job done.
So, our intent here is to list every trick or tip we know to speed up websites super fast.
Before we dive into this hot topic, the question is
Why we should bother to speed up WordPress website?
There are several factors which will convince you to spend some of your time to speed up a WordPress website.
- Search engines like Google rank websites which have fast loading time than the one have low loading time. So if you want to improve your position in SERPs (Search Engine Result Pages) then speeding up your website should be the first priority.
- Research has shown that website loading speed of more than 2 Seconds results in about 47 per cent of visitors bouncing off the website. So to keep your users interested, you should speed up a WordPress website.
- People making purchases online tend to have low patience, they expect to load web pages super fast. So if you are running a WordPress based e-commerce website, you should optimise your website for lesser load time.
Testing your website for loading time
Before implementing any strategy to speed up WordPress website, you need to know what is the loading time of your website currently. Loading speed of a webpage may vary on several factors like :
- the size of your website page
- how many requests your webpage is making
- your webpage is cached or not
To test webpage speed you can use the following tools:
It’s time now to talk about how to achieve a less loading time for a WordPress website.
1. Use Light Weight WordPress Theme
WordPress theme with a lot of dynamic elements, sliders, widgets and other eye-catching UI elements are appealing to the eye. But remember more elements you use on your webpage, slower you webpage will get, because dynamic elements make requests to fill their data which make your website slower.
For example, if you use an Instagram widget to display your photos in that widget. A widget will be making calls to Instagram API to scrape images which will ultimately make your website slower.
The best option here is, use bare minimum UI elements and backup your theme with a lightweight framework.
2. Better Hosting Provider
Website speed heavily depends on the type of hosting you are using. It’s a good idea to host your website on shared hosting which provides unlimited bandwidth, disk space and domain, but usually shared hosting’s performance drop on peak time. Shared hosting tends to perform poorly because your website use shared resources on the server and there is no telling how much other websites are using server resources. Shared hosting also give less control over how you optimise the server.
These companies provide dedicated cloud servers and charge you per hour. Buying these servers will be a daunting task as you need to have full knowledge of how you setup a server from scratch.
There are companies in the market who offer managed dedicated server which comes at an extra cost.
3. Optimise Images
Images are the major contributors to size increments of a given webpage. The trick to handle this is optimising your images without compromising on image quality.
If you optimise your images using Photoshop or online free tools, that process will take a lot of your time. Luckily, there are plugins available for this job for you. These are ones worth mentioning.
4 .Minify your CSS and JS
If you put your website in any of the above speed testing tools, you probably have notified for CSS and JS files minification. By reducing the size of CSS and JS files you can save some of the seconds to load your webpage. CSS and JS files minification means, compress all CSS and JS files by removing blank lines and white spaces from them.
There are plugins available which help you to minify your CSS and JS files. Autoptimize is one of our favourite plugin to minify CSS and JS files even HTML as well.
5. Use CDN
Your website will be accessible to the whole world. Website loading time can be increased if the visitor is far away from your hosting provider’s location. There are a lot of CDN (Content Delivery Networks) available which help in keeping the site loading speed to a minimum for visitors from various locations.
A CDN keeps a copy of your website on different servers around the world. CDN job is to serve your website from the nearest possible location. Cloudflare is the most popular CDN to go with, for small websites they provide CDN service free of cost.
6. Reduce HTTP Requests
A website consists of several components like stylesheets, images, scripts and more. More the elements you have on your webpage more you have to make HTTP requests. According to Yahoo, 80% of website loading time is accounted for downloading the different elements of the webpage.
You can use HTTP Request Checker to find out how many requests your webpage is making. You can reduce the HTTP request by following the below techniques:
- Base64 Images : You can use the base64 encoder to convert an image to code, because its a code within your html page thus HTTP request eliminated.
- Concatenate Files : Dont have multiple CSS and JS files, you can combine all CSS files into one and same for JS files.
- CSS Sprites : Combine multiple small images to a Sprite, and call the sprite which will load all your images at once.
7. GZIP Compression
When we zip a large file on our desktop computer, it makes the file size smaller, same technique we can use for the websites. We can use GZIP compression on the server which will dramatically increase the speed of your website. GZIP compress various files and when a user visits your website, their browser firstly unzip the files before serving it.
GZIP compression is so effective, you will notice that it will reduce 30%-40% size of your page. W3 Total Cache offers HTTP (GZIP) compression out of the box.
8. Install a Cache Plugin
There are lots of Cache plugins available on WordPress Plugin Page. These plugins provide an easy interface to setup cache rules for your WordPress website. These plugins make copies of your web pages content, instead of querying the database every time, and show the static version of your website immediately.
You can combine WordPress cache plugins with advanced serverside cache technology like Varnish to boost the speed of a WordPress website.
9. Break comments into pages
If you have noticed, the most popular post on your WordPress website is the one loads very slowly. It’s because of the hundreds of comments on that page. You can’t afford to close comments as they are the link builder for you.
How to handle this? WordPress provide the smart solution to this problem, by breaking comments into pages.
In your wordpress Dashboard, under the section Other Comments Settings, you can change the settings how many comments you want to show on one page.
10. Use latest PHP
Upgrading PHP to the latest version on the server is a daunting task unless you have full knowledge of how to set it up. If you are using a shared hosting this job will be very easy, you can change the latest PHP version very easily from your cPanel.
PHP7 is the latest major release of PHP, which dramatically increases your website speed up to 40%.
Speed up WordPress website can lead your website to improve the experience of visitors. It also helps you to increase your website ranking in search engines.