7 Steps to Optimize WordPress for Better Performance

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 :-

To decrease the size of data that’s being transferred between your server and visitors, you can enable the gZIP compression for your images, CSS and JavaScript files at New Delhi hosting we provide gzip compression provisioned in cPanel ,By doing this, the web server will compress this content before it’s transferred over the Internet to your browser.

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:

## Enable gZIP Compression ##
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
## Enable gZIP Compression ##

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.

 

Step5: Minify your JavaScript and CSS files :-

Minifying your CSS and JavaScript files means that all the unnecessary data from them like double spaces, empty new lines, comments, etc. will be removed from the files lowering their size. There are many online tools that you can use for free to minify your files. In addition, if you’re using the W3 Total Cache plugin, it has an option to automatically minify your theme’s CSS and JS files.

 

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.


ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/x-javascript "access 1 month"
ExpiresByType application/javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 2 days"

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

 

 

 

 

Similar Posts

Leave a Reply

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