Everyone knows site speed plays important role in terms of website success. More your site loads fast, more users are engaging with your content. In this article, we show you 6 steps to speed up WordPress website.
A standard time your site should load is less than 2 seconds. If your site takes a 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 to check your website on Google Page Insights. From my experience, this tool gives a better result. Google Page Insights shows you the distractions which causing your site loads slowly.
Let’s see step by step process to improve a site performance and speed. Below is the screenshot of my website score on Google Page Insight.
Step 1- Include CSS and JS In A Standard Way
Step 2- Optimize Images Before Use
Images play important role in improving a user experience. Eye-catching images keep your users engaged with the content. But, 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 optimize images before use. There are several plugins available which do this task of compressing images from your media library. Some popular plugins are
- Compress JPEG & PNG Images ByTinyPNG
- ShortPixel Image Optimizer
- Smush Image Compression and Optimization
- EWWW Image Optimizer
All these plugins work well. I would recommend to use 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 media library. We create a custom directory and upload images in it, then use these images on the website. I have written an articles on Optimize Image On Upload and TinyPNG Compress Images. Please refer this articles if you are not using media library for images.
Tip: Crop the images of a 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 larger size in a small container. This also affects the site performance.
Step 3- Lazy Load Images
Lazy Load Images helps to speed up your website. Using lazy load plugin, your images do not load until user scroll 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 plugin, then please read on 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 request coming from the website. Once your database starts increasing, your server taking more time to respond.
In the WordPress, as the time passes several orphan data stored in your database. For example, when you update post or page, each time WordPress store the revision in the database. I would prefer to keep only 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.
Step 5- Use Of Cache
Thanks to engineers which introduced the concept of the browser cache. When a user visits your website, user’s browser store your page in the browser temporary storage location. When the user visits the website next time, the browser presents the page to users from last stored cache instead of loading whole page again. This reduces bandwidth usage on both user and server side. Using the cache for your website dramatically speed up 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 in your site htaccess file and it will enable you browser caching.
Note: In the 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 it on your website.
I hope you understand how to speed up 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.