Recently I found the simple and easiest way to compress wordpress page with only one step hack, and the result the page created by wordpress will be 60% - 80% smaller and faster to render. It's quite different with the earlier way to compress page, GZIP and Mod Deflate File Compression where we need to insert php code one by one to .htaccess and php files. But this one takes only one easy step with the same magnificent result.

<?php
/* DVS Compression Start*/
function wp_http_compression() {
// Dont use on Admin HTML editor
if (stripos($uri, '/js/tinymce') !== false)
return false;
// Check if ob_gzhandler already loaded
if (ini_get('output_handler') == 'ob_gzhandler')
return false;
// Load HTTP Compression if correct extension is loaded
if (extension_loaded('zlib'))
if(!ob_start("ob_gzhandler")) ob_start();
}
add_action('init', 'wp_http_compression');
?>
Put the code in the first line of your functions.php file, save or update and you're done. It is that easy? Yep, If you have done it correcly, now the page is compressed with smaller size. To check whether your page is compressed or not, you can test it here: http://ismyblogworking.com, or you may also use google pagespeed and yslow. Try it, and Good Luck!