Monday 13 June 2016

How to Optimize Wordpress Website? IT NEW CODE

1> First Add following two plugins in WordPress.
     1. W3 Total Cache

     Enable Both plugin.
     => W3 Total Cache plugin check all option.
     => Optimise all your uploaded images using WP Smush plugin.

2> Open your Cpanel & open ".htaccess" file. Then add following code in it.

## LEVERAGE BROWSER CACHING ##
<IfModule mod_expires.c>
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"
</IfModule>
## LEVERAGE BROWSER CACHING ##

<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On 
# Default directive
ExpiresDefault "access plus 1 month"
</IfModule>


3> Open "wp-config.php" file and add following code in it.
/*** Optimize wordpress for trash clear ***/
define ('EMPTY_TRASH_DAYS', 7);

/*** Optimize wordpress for reduce Revisions ***/
define( 'WP_POST_REVISIONS', 3 );


/*** Optimize wordpress for reduce Revisions close ***/
define( 'WP_POST_REVISIONS', false );


Now Test Your website.




For more Interesting, Useful Article & codes visit IT New Code.

Ankit Shah PHP Expert

IT New Code suggest a solution for your problem related to coding, Specially .PHP, Wordpress, WooCommerce, Magento, HTML and CSS. Visit Our website for Information.

1 comments:

  1. Images are great, they are said to be worth thousand words and attention spans are shrinking so the more you can get across visually, the better chance you have in communicating your message to the incoming visitor. But, due to load of images, website load time get longer that causes increase in bounce rate, WordPress image optimizer plugin helps to reduce the size of images and boost website to load faster.

    ReplyDelete

 

Copyright @ 2016 IT New Code | Developing Code | Designing Code.

Designed by: Ankit Shah