Over the years WordPress has evolved from a simplistic blogging engine to a very Powerful CMS. Despite of being an awesome CMS, WordPress comes with its own set of issues. One issue that should concern you most is that, it’s fairly slow in comparison to many other platforms. Every element of your webpage (e.g. widgets, comment forms etc.) on WordPress makes a database call and it negatively affects the page loading time.
Improving page load time – Why it’s important?
A slow website can’t hold visitors for long. Worse, if the first page served to a new visitor is taking too much time to load. He might give up the idea to wait and go away, without even giving a glance to your content. Isn’t that a chance lost?
Slow page load time may cost you search engine traffic as well. Google has already clarified that the page speed is taken into account while ranking a webpage. Plus, if you are not able to retain your visitors, search engines get a bad hint about your content.
How to improve Site Speed?
Fortunately, improving page load speed on WordPress is not very tough either. A few plugins, some workarounds and you are done.
[Caution: Note that all these tips and tricks work only if your website is hosted by a good host. Even after trying all these workarounds, your page loads slow, consider shifting to a better web host. Read more on choosing a good web host]
Improving server side load
Before your website is displayed in a browser, it has to go through server side scripting in order to display the exact information queried. How quickly your server resolves the queries and serves the data, decides the load time of your page. Here are a few tips you can use to reduce the server side scripting time.
1. Use a cache plugin
As we mentioned, every WordPress page makes a number of queries while loading. Every query converts PHP in to HTML in order to display it through web browsers. One cool way to minimize queries is to replace the PHP with HTML wherever possible. For example, if your categories are permanent, you can place them manually in your theme instead of placing a widget. However, this needs dirtying your hands with codes.
A simple solution is to use a cache plugin. They create HTML codes out of PHP when the page is loaded for the first time and then display that cached static HTML to following visitors. These plugins keep refreshing the cached version periodically or on occurrence of particular events (e.g. when a new post is published). Using a cache plugin can significantly speed up page loading time of your WordPress website.
We recommend using W3 Total Cache as its one stop solution for all your caching needs. Additionally, it also helps you out with using content delivery network (CDN), GZIP compression, minifying CSS etc.
2. Optimize WordPress Database
WordPress operates on MySQL database which stores all the information of your website (e.g. posts, users, comments etc). With time the database collects a lot of useless information like spams, post revisions etc. You need to periodically optimize your database to remove the clutter and keep it clean. An optimized database responds better to PHP queries, speeding up your website.
We recommend using the plugin WP-DBManager which lets you schedule automatic optimization of your database periodically.
3. Improving image load time
Images add life to your webpages, but on the other hand, they require a lot of bandwidth to server. As a rule of thumb, you should never use images of larger dimensions than required. But that’s not all, there are more ways to optimize your images so that they don’t negatively affect the webpage speed. I would suggest a couple of plugin which can help in optimizing the images on your wordpress website.
Smush.it is an image optimizing service from Yahoo which reduces the file size of an image without reducing the quality. A WordPress plugin called WP-Smush.It does this automatically for all your images. You just need to install this plugin and forget. Whenever you upload an image, the plugin will smush it automatically.
LazyLoad is a smart plugin which only loads the images which are above the fold (area of webpage visible in the browser). Images below the fold are loaded only when a user scrolls down to the images. Next time when you write a tutorial with many images, don’t worry about page load time.
5. Using a content delivery network (CDN)
Physical distance between server and users matters. A website hosted in US will take more time to reach an Indian user in comparison to a local host. A content delivery network duplicates your content to different servers and directs it to users based on proximity.
There are many free or paid CDN services available for WordPress. You can easily install and setup a CDN on your blog through W3 Total Cache plugin mentioned above. Alternatively, you can also use wordpress.com CDN through Jetpack plugin.
Once your website is optimized, you will experience improvement in visitors retention immediately and search engine traffic on a long term, provided your content is good. There are many browser extensions (e.g. YSlow, Page Speed) to check the page load performance of your website. You can also use web tools like Pingdom to check the pre and post effect of implementing these tips.
This post is written by Ashwini. He is a regular contributor to the Webriti Blog