Home / admin / Enable GZIP output compression
  • How to Enable GZIP output compression

    no thumbnail sorry: Enable GZIP output compression

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

    ( click code to copy )

    wordpress snippet : PHP

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

    ( WordPress codex functions, hooks, in this snippet. )

    add_action, _e, wp,