Complete reference to improve the page speed of any wordpress website

2

Website speed is a great factor in search engine ranking. Website faster load helps not only in search engine rank but also help to attract visitors to visit website regularly. Now that is a common question how do we minimize the load time to maximize visitors in any website.
page-speed
I assure that you can significantly improve your website speed by following my tips. Here following the tips to improve your website speed up to 95%+ ( out of 100%).

Choose a better hosting plan :

You should use a better hosting plan from any reputed hosting company like hostgator , bluehost. If you use wordpress then i recommend you to use Wp Engine which Speed up WordPress with their baked in CDN, super fast servers and amazing up-time.

Automatically Optimize images is wordpress

You can optimize your wordpress website images automatically by using a Free plugin. Simply install that and then go your wordpress Dashboard > Media . Now click on Bulk Smush.it feature. You can find the link under the Media Library tab.

image optimize

Optimize the homepage content to load fast

To optimize the homepage of any wordpress website you should keep it simple and clean. You should show the excerpts instead of show full article or posts. Don’t use unnecessary sharing widget in homepage for post. You should use that on single post page just. Try to mimimize usage of wordpress plugins and reduce the number of posts for homepage ( maximum 10 post is enough)

Optimize the database of wordpress

There have some free plugin available in wordpress plugin directory to optimize the wordpress site database without login phpmyadmin. You may feel free use anyone of them after checking description and reviews. Here i recommend to use the WP-Optimize plugin to optimize spam, drafts, , post revisions, tables etc and WP-DB Manager plugin to set the schedule dates for database optimization. You can do that manually too from Phpmyadmin, if you don’t want to use any plugin. Here i am showing that for you :
At first select the database after login in phpmyadmin form hosting cpanel where you installed your wordpress site.

optimize database

Now select all the tables from “Check All” and then select Optimize table option from the dropdown menu and finally press on Go button bellow. Your database tables will optimize by this method. If you want to optimize partial table from that database you can do that by following above method. You just need to select individual table for that.

To avoid large unnecessary database for your wordpress site you should turn off your Post revision option from wp-config file. Just use code from bellow :

You should disable post revisions feature completely and I strongly recommend it to make fast performance of your website .

Another nice way of interfere with bulky databases is to clear the trash automatically in a regular time intervals which will set by you in wp-config.php file. So use the following line of code and add it in your wp-config.php file. That will purge all the trashed itmes every 5 days. You can change the days value yourself.

Set an Expiry Date in The HTTP Headers For Static Resources

When you usually run google’s PageSpeed Test, you may have noticed Leverage Browser Caching problem there. If you can fix that problem, your website performance will might be improve.

To solve that problem you should write the following code in your .htaccess file which is located in your root directory of wordpress install.

 

Compress the website components

Copressing the wordpress website components, it load more faster and perform well in web browser. So that is must necessary thing to boost webesite speed easily. This optimization process will may not work if the server does not allow mod_deflate or mod_gzip.
Here follwoing the code for mod_deflate and mod_gzip code.

Remove the unnecessary PHP code and Database Access

Usually we use some common php code in our wordpress site header, If we use static HTML instead of these php codes then it save CPU processing time and database queries.

Here following the exmaple of that :

Suppose- if we use the above code in our header.php file, there need 6 different PHP commands execute every time when page loads. And these PHP commands pull the information or data from the database every time.

So now you can solve that issue from your side easily. Simply view the source of your website by press Ctrl + U and then copy the static HTML from there. It would be similar as like bellows example code :

Trim down the server requests effectively

Every time web server getting separate request to load our webpage. That would include the javascipts, html, css, images and any other media whis is used on webpage. Web server can handle on the certain number of request at a time. So we may get slow performance when most of the visitor visit in same time. That’s why CDN is a great solution for that but CDN is very expensive. We can reduce the server request time easily by using the following techniques.

Suppose if you upload your images in Flickr and then attach the link to embed on post, it will decrease the amount of server request. When the visitors come to your website all the images are being served up by Flickr’s giant servers which can easily withstand the load.

You can apply the same way or techniques for video other media. Just upload the videos in youtube, Video, Google Video or any other good video hosting website who have embedding feature.

Minify CSS and Javascripts file

Normally we use tabs, spaces, line break, comment line etc to make our code more human readale. But servers and browsers don’t care about of human readility. It just execute the valide code. There have some plugin available to minify CSS and Javascripts for your wordpress website. But i recommend you to do that manually whitout using any plugin.
Open your theme, plugins css and javasciprts file one by one and save the minified version. I recommend you to use cssminifier.com and jscompress.com

Deregister and dequee wordpress scripts from function (If Needed)

Sometimes you may need to deregister and dequee wordpress’s script from all pages. Just use the following code to do that :

If you want to deregister and dequee the scripts from only the homepage, Just use the following code :

Dequee the styles from particular page :

Dequee the styles from homepage :

Move all the scripts from header to footer

Move all the scripts from header to footer for only homepage

Move all the scripts from header to footer for particular page

Remove the query string from javascrips and css

Google page speed analyzer tool and Yahoo YSlow always suggest to remove the query string from javascripts and css files. Its to hard to remove that query string from theme and plugin. But you can do that easily by using little function bellow :

Defer parsing of javascripts

In order to load a page, the browser must parse the contents of all script tags, which adds additional time to the page load. By minimizing the amount of JavaScript needed to render the page, and deferring parsing of unneeded JavaScript until it needs to be executed, you can reduce the initial load time of your page.

Minify HTML, Javascript and CSS by functions

You dont need to use any unnecessary plugin for minifying the HTML, css, inline javascrips. Just use the following code in functions.php and see the result by pressing ctrl+U

boost page speed

Beside this you may add layzyload to your images, combine all the css and js file into one or two file, adjust Gavatar images, Disable hotlinking and leeching of your content, Use an effective caching plugin, Turn off pingbacks and trackbacks etc to boost your website performance.

Share.

About Author

I have no more personal information to share with you but have enough experience to share with all. I am always funny