Enable GZIP output compression

WordPress Tutorial – Adding this PHP code to your functions.php of your wordpress theme will enable GZIP output compression with zlib if available.

 

 

if(extension_loaded("zlib") && (ini_get("output_handler") != "ob_gzhandler"))
add_action('wp', create_function('', '@ob_end_clean();@ini_set("zlib.output_compression", 1);'));

Leave a comment