In this blog we are going to see some ideas on how to improve the speed of our WordPress website. Having a fast site is necessity to provide our visitors with great user experience and rank well in the search engines like Google which take the loading speed of our pages into consideration.
Step1: Enable Dynamic Caching :–
“Adding Dynamic caching” to your WordPress site will have great effect on its speed. There are many services like Varnish and APC that can be used but all of them require a lot of server configuration and tweaking of your application to work correctly. For this we can install a simple wordpress plugin “WP Super Cache“. This plugin generates static html files from your dynamic WordPress blog. After a html file is generated your webserver will serve that file instead of processing the comparatively heavier and more expensive WordPress PHP scripts.
Step2: Enable gZIP compression :-
The easiest way to enable the gZIP compression for your images, CSS and JS files is to add these lines to your .htaccess file in the root WordPress folder:
Step3: Use a CDN :-
CDN -Content delivery networks are server networks that clone cached copies of your site on all of their location nodes. This means that when your visitors request your site, cache of it will be served by the closest server location, rather than the main datacenter of your hosting provider.
Step4: Optimize your Images:-
Images are important to have them optimized,It is essential part of every website There are few things regarding your images that you should have in mind when developing your WordPress site:
4a) Do not upload big images and then scale them with HTML.Use images with the proper size. Make sure that your images are not bigger than the size you’re actually displaying them in.
4b) Smush your images. Smushing them will remove all the additional data from your photos – creation date, camera used for the photo, GPS coordinates, etc. There is a “plugin” that does that for you called WP Smush.it.
4c) Use Sprites for your themes. Using sprites is a CSS technique that uses a single image to show multiple design elements on your pages. This way instead of loading dozens of small images,your site will open a single one.
Step6: Leverage browser caching :-
It means that you can specify for how long your visitors’ browsers should cache your images, CSS, JS and flash files.However, if any of those resources is cached, your server will notify the visitor’s browser and the cached content will be replaced with the new one.
You can add the following line to “.htaccess” file of wordpress.
Step7: Optimize your WordPress Database:-
It is essential to optimize the wordpress database from time to time.Every time your web application runs a database query, the database will look through all the rows in your table to find those that match your request.A database index is a data structure that improves the speed of operations in a table