How to Optimize WordPress for Better Performance

A faster site means superior loading times. This means your site can run in any internet speed. This also suggests that more and more people should reach at your site irrespective of internet speed and locational disadvantages. In this world, there have been many locations where primitive internet connectivity still exists. With a super fast website they can browse your site with super ease without any lagging time. Google and Bing also like to fond of your site due to the presence of faster loading time and chance to attract more and more visitors towards your site. Google and Bing also consider seriously page loading times of website before they index such sites into their search engine indexes.

Learn how to speed-up your WordPress website:

How speed-up WordPress sites are surely the hot search topic on search engines. This tutorial is based upon personal experience of the author who all likely prefers to experiment on his site so as to provide one of stupendous website experience. To a packed website, there is more likelihood for visitors bouncing off the website. Research shows that these figures is all about 46 percentages bounce rate which is staggering and for this it is important to optimise website so as to attract more and more visitors.

1. Do not install cache plugin:

I have researched extensively on the subject of installation of cache plugin on back end of server but ultimately I found that most of these cache plugins works wonders but it also imparts serious stress issues on hosting and if you are on a shared hosting then for sure you should be feeling the brunt of offline of yours sites for some times and this should not be good for yours site. These plugins do generate html files and stay with hosting and this should create problems for your loading times of your website.

2. Choose a better web hosting provider:

You should be a better web hosting provider as your site is for the long term and choosing a better web host can lead to a permanent solution for extreme stability of your site. Dedicated hosting is a good thing but it comes with extreme cost. If you are with shared hosting then go for any good content delivery network (CDN) which is to be discussed later on in this tutorial.

3. Use a lightweight WordPress Theme:

It is better to use a light weight wordpress theme so as to reduce landing page load times. Most times, commercial wordpress theme does come with extensive features but also slows down website to a greatest extent. I have used a modified version of free WordPress theme 2012 which is from the creator of WordPress. It is lightweight and amended from time to time. It is one of the classic themes which has very little cascading style sheets (CSS) as well as it can be customised according to yours wishes.

4. Do not use a plugin when you can use code:

You are supposed to be well known to code part of PHP if you have a website with WordPress. There are many customisations and optimization which can be done easily with these coding part so get rid of codes for such smaller improvements on your site. Suppose you want to have related posts with your website then do not install any plugin related to it but install small PHP codes on hosting files in order to get these benefits. Code insertion you get faster website and loading times of these codes becomes super fast and website optimised it accordingly. Similarly, if you want to insert Google Analytics code then install its files on your server and link to your website files. Numbered page navigation, archives and categories can be easily done with slices of codes into your website. Leave such plugins and move towards inserting codes into yours hosting parameters in order to remove any difference on your site. How to display post experts in 2012 theme can be found here.

5. Keep your WordPress and plugin versions up to date:

It is important. Always keep your WordPress version up to date. It is a good idea to enable automatic up to date so that it can be updated from its hosting patterns. Most websites are hosted with US servers or their native country’s server. Use the automatic update of website so as to minimise the chances of the daylight saving time. By periodically checking into the backend of WordPress you can find out which plugins are out of date. Then immediately update those plugins in order to secure a WordPress installation. From time to time, plugins are updated in order speed-up its performance and for this it is wiser to update plugins as and when it arrives at notifications to your WordPress installation.

6. Flush the buffer:

WordPress has PHP and HTML configurations and it delivers with a web browser when user requests such site which is built with it. PHP codes of cPanel are optimised and then converted into HTML on your web browser. It can take around 500 milliseconds more due to processing of the backend server in converting PHP codes into HTML codes. The flush() function in PHP can help web browser partially ready HTML pages to user’s web browser and in the mean time while website loads partially, the backend server keep busy with the rest of the contents so as to run website in great neck speed.

The flush() function in your WordPress site runs from header.php file of WordPress installation. One can reach to cPanel of hosting then move to file browser and then to theme files and then open header.php in edit mode. It is important in order to backup header.php before editing in order to save your sites in case any mis-handling of code occurs. You can edit these at your own discretion and you should back up edited files in this case header.php before going for editing of files.

Automatically empty the Trash

Automatically empty the Trash

Find the </head> tag and then in between </head> and <body <?php body_class();?>> insert the following flushes the buffer function.

<?php flush(); ?>

Generally on some themes the <body> can be coded as <body <?php body_class(); ?>> So if you do not find the body tag then go for <body <?php body_class(); ?>> code instead.

7. Automatically empty the Trash:

WordPress runs with various configurations. Even creating a post can, lead to savings of different versions of such posts which can ultimately accumulate too many congestions to database of WordPress and ultimately slows down website considerable extent. WordPress can automatically empty these trashes automatically after certain specifically recommended days. Simply add one line wp-config.php file. It is important in order to back up wp-config.php before moving into editing such files. You should do these editing at your own discretion. In this code, it is definitions of WordPress to automatically empty the trash after ten days. Add the following new line to wp-config.php file. Which can be accessed from cPanel or back end of WordPress hosting.

define(‘EMPTY_TRASH_DAYS’, 10 );

8. Use Google CDN for Jquery:

Google is present everywhere all around the internet world. WordPress contents many instances of Jquery which takes ample time to load website due to contact of different web hosts at the same time. Most of these functions seems to be wasting of bandwidth of users as most of these J query related functions downloads, into web browser or computer of web host and then it runs and eat precious bandwidth of user as well as increase load times of website. You can use Google hosted Jquery content delivery network. Then there is every chance that these codes are already downloaded to user’s computer and there is no alternative download of these when a user open your website on a web browser.

Use Google CDN for Jquery

Use Google CDN for Jquery

It speeds up your website as well as reduce page loading times and saves precious bandwidth of user’s internet package. Google CDN for Jquery increases server’s response time by reducing latency into the codes, and prepares better grounds for caching of website.

Open up function.php file which can be located inside theme folder. Theme folder is generally inside the file browser and file browser is hosted on cPanel. Add this code into the end of function.php

/* Google JQuery*/
add_action( ‘wp_enqueue_scripts’, ‘register_jquery’ );
function register_jquery() {
wp_deregister_script( ‘jquery’ );
wp_register_script( ‘jquery’, ( ‘’ ), false, null, true );
wp_enqueue_script( ‘jquery’ );
9. Use a CDN:

CDN is a content delivery network, which hosts website files externally nearest geo-locations all over the world to deliver cached and optimised copies of your website to visitors nearest to its location. It reduces server response times, speeds up landing page time, it increases security of website and reduces bounce rates at most times it blocks automatic computer generated bots those can eat precious bandwidth of hosting. I use sitelock content delivery network which acts as a firewall between host and visitors and secure website through 360 degree scanning in order to remove any chances of virus infection into website. Apart from all these it has normal content delivery network as other popular CDN.

10. Enable GZIP Compression:

WordPress runs with PHP and this can take huge coding space and can create heavier website. Modern day PHP does have various configurations to reduce the PHP file size when it is loaded into user’s computer through a web browser. One can find GZIP compression on their hosting cPanel and enable it for all components of website. It works for html, image and other heavier part of website in order to expedite website. If you content delivery network just like mine of Sitelock then most probably it has been enabled for it you or you can enable this on cPanel or if it does not have it inside cPanel then you can edit .htaccess file in order to speed up website. It is important to backup .htaccess files before editing. If your host has GZIP compression in built into it than just enable it and ignore .htaccess part of it.

To be continued

Related Articles

Leave a Reply

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