Thursday, October 16, 2014

Speed Up Your WordPress Site

Speed Up your WordPress Site

Remove Inactive Plugins

Most of us love to try out a fresh new WordPress plugin. We are all guilty of installing ones we don’t really need, or of installing a plugin, trying it out, deciding we don’t really need it and deactivating it, leaving it sitting inactive in our installation (nb – an inactive plugin won’t slow your site down but it will take up space. This will only cause you problems if you have restricted space).  Its better to remove all those inactive plugins that you dont use.  So make sure that the plugin directory is cleaned up.

Tip:  Don’t use a plugin when you can use code
Keep Your WordPress Version Up To Date
With the release of new versions, WordPress keeps on improving, the developers put their effort in making WordPress faster and safer.  So be sure to grab the latest stable installation when you can.


Optimise the WordPress SQL Database

Just like your hard drive the WordPress database too can become fragmented.





To optimise the wordpress database of your site, visit your cPanel & use phpMyAdmin to Optimise and Repair the Tables.

If you are like me and like to be efficient, you could automate this process by either installing a plugin like WP-DB Manager or if you are a very confident and experienced web site designer you could setup a Cron Job, an automatic program that you can execute at specific times and at specific dates. You can set this up through your CPanel, but I would not recommend this if you are at all unsure of what you are doing

Flush the Buffer

When a visitor to your site visits a page, it can takes around 200 – 500 milliseconds for the backend server to put together the HTML version of the page. During this time the browser remains idle. The flush() function in php will help by  loading the partially ready HTML page to the browser and it can start fetching the components, while the backend server is busy with the rest of the contents.

To insert the flush() function in your WordPress site, open up the header.php file and find the </head> tag and insert the <?php flush(); ?> function right after it.

</head>
<?php flush(); ?>
<body>

Add Expiration to Static Items

Adding an expiry time to your static images can reduce the number of HTTP requests when loading other pages in the site. Adding an expiry time to the images in the site help in loading the pages faster.
Simply copy and paste this code into your .htaccess file.

ExpiresActive On
ExpiresByType image/gif A604800
ExpiresByType image/png A604800
ExpiresByType image/jpg A604800
ExpiresByType image/jpeg A604800

Courtesy By Vrajesh Shah....