6 Steps To Speed Up WordPress Website

Everyone knows site speed plays an important role in terms of website success. The more your site loads fast, the more users are engaging with your content. In this article, we show you 6 steps to speed up the WordPress website.

A standard time your site should load is less than 2 seconds. If your site takes more than 2 seconds to load then you are doing something wrong.

There are several online tools available to check the speed of your website like pingdom, etc. But, I would recommend checking your website on Google Page Insights. From my experience, this tool gives a better result. Google Page Insights shows you the distractions which cause your site loads slowly.

Let’s see step by step process to improve a site’s performance and speed. Below is the screenshot of my website score on Google Page Insight.

Speed Up WordPress Website

Step 1- Include CSS and JS In A Standard Way

Did you ever notice the message Render blocking JavaScript and CSS in above-the-fold content? If you have not included CSS and JS in a standard way then it can slow down your site. As a rule of thumb, CSS should include in a header and JS should be in a footer. You should take care of your website following this standard practice.

Step 2- Optimize Images Before Use

Images play an important role in improving the user experience. Eye-catching images keep your users engaged with the content. But, the use of heavy images almost kills your website speed. For instance, you have uploaded an image with size 2MB on the site, then while loading the page this 2MB takes an extra time to load the image before presenting your page to the audience.

Here comes the concept of optimizing images before use. There are several plugins available that do this task of compressing images from your media library. Some popular plugins are

All these plugins work well. I would recommend using the TinyPNG plugin. I am using this plugin for my website and I am quite happy with it.

In some cases, we need to display images outside of the media library. We create a custom directory and upload images in it, then use these images on the website. I have written an article on Optimize Image On Upload and TinyPNG Compress Images. Please refer to these articles if you are not using the media library for images.

Tip: Crop the images of the size you want to display. Let’s say, you have a container of size 300*250. In that case, you should crop the image as per container size. Do not use the image of a larger size in a small container. This also affects the site’s performance.

Step 3- Lazy Load Images

Lazy Load Images help to speed up your website. Using the lazy load plugin, your images do not load until the user scrolls to them. It helps to reduce the size of your page at the time of loading.

If you want to implement lazy load images without using a plugin, then please read our article on Improve Website Performance By Lazy Load Images.

Step 4- Optimize Database

As far as your database size is small, your server responds quickly to database requests coming from the website. Once your database starts increasing, your server takes more time to respond.

In WordPress, as time passes several orphan data are stored in your database. For example, when you update a post or page, each time WordPress stores the revision in the database. I would prefer to keep only the last 3 revisions which are quite sufficient. To keep revisions up to 3 times, you need to place the below code in your wp-config.php file.

define('WP_POST_REVISIONS', 3);

The above code limits the number of revisions. There are some other tables that should also get optimized. I recommend using WP-DBManager or WP-Sweep plugins to optimize your database.

Step 5- Use Of Cache

Thanks to engineers who introduced the concept of the browser cache. When a user visits your website, the user’s browser stores your page in the browser’s temporary storage location. When the user visits the website next time, the browser presents the page to users from the last stored cache instead of loading the whole page again. This reduces bandwidth usage on both the user and server sides. Using the cache for your website dramatically speeds up the WordPress website. Some of the popular cache plugins are as follows.

Step 6- Leverage Browser Caching

When you leverage browser caching, your webpage files will get stored in the browser cache. Your pages will load much faster for repeat visitors. Add the following code to your site htaccess file and it will enable you browser caching.

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 2 days"
</IfModule>

Note: In WordPress, some plugins are using external resources. We can’t set expire headers on these external resources. One way is to store these external files on your server and then include them on your website.

I hope you understand how to speed up the WordPress website. If I missed something or you are using some other techniques please share in the comments below.

If you liked this article, then please subscribe to our YouTube Channel for video tutorials.

Leave a Reply

Your email address will not be published. Required fields are marked *