Menu bar

Monday 18 August 2014

Speed up the Wordpress.

How to speed up Wordpress

Focus on those point to boost your wordpress site.
Use Effective Caching Plugin
       W3 Total Cache
       Autoptimize

       Eliminate rendering Javascript

Simply install and activate the above mentioned plugin and check your pagespeed. Then you should make changes according to your requirement.

Use a Content Delivery Network (CDN)
       FREE-CDN 

Optimize Images Automatically
       SMUSH IT

This is a image optimizer which will provide you easy gui to optimize image near your media file in media tab of wordpress. This is provided by YAHOO! 

Optimize the Homepage to Load Faster as Possible
     
Show excerpts instead of full posts
      Reduce the number of posts on the page 
      Remove unnecessary widgets from the home page 
      Includes widget in post only
      Remove inactive plugins and widgets that you don’t need


Add an expires header to static resources

       An Expires header is a way to specify a time far enough in the future so that  the clients (browsers) don’t have to re-fetch any static content (such as css file, javascript, images etc).
       This way can cut your load time significantly for your regular users.
    

PHP array functions explained.

PHP array functions.

1. array_change_key_case  -  Changes the case of all keys in an array and not of the values of the array.

Example:
<?php 
$input_array = array("Key1" => 1, "Key2" => 2);
print_r(array_change_key_case($input_array, CASE_UPPER));
?>

Here, in an output ,Key1 and Key2 will be change to KEY1 and KEY2.



2.array_chunk - Split an array into chunks.It will divide the array according to argument value that will be pass in this function.

Example1:
<?php
$chunk_array=array("a","b","c","d","e");
print_r(array_chunk($chunk_array,3));
?>

Example2:
<?php
$chunk_array=array("a","b","c","d","e");
print_r(array_chunk($chunk_array,3,true));
?>