Speed up your Wordpress Blog

Wordpress, by default, sends uncompressed HTML to the visitor’s browser. By using few lines of code added to header, you can compress Wordpress’s output by up to 75%. We’ll use zlib compression technology, to compress data being sent from wordpress blog.

First, place the following code in a file and call it “test.php” and then upload it to the root of your blog directory: (this is to check whether your php hosting server supports zlib)


< ?php phpinfo(); ?>

Now, open this file in your browser by going to http://www.example.com/test.php. This will open PHP Info page. Make sure zlib is enabled & supported on your hosting server. If not, ask your hosting provider to enable it. (zlib is enabled and fully supported on hosting solutions offered by us. Thanks to Synergy Informatics, our hosting partner!)

Now, place the following code in your header.php (above the DOCTYPE):


< ?php
ini_set('zlib.output_compression', 'On');
ini_set('zlib.output_compression_level', '1');
?>

That’s it. You’re done. Now check the speed. You’ll notice that the speed of your Wordpress Blog or Wordpress powered CMS has increased.

We’ve implemented this solutions on many of our client’s busiest sites including ours. You can notice a lot of speed improvement in few of them.

We would love to hear from you. Please spare a time to leave your comments on our blog.

One Comment »

  • Comment by Remy — April 1, 2010 @ 4:20 pm

    Hey, this comes handy as you save my day….. after searching for 3 days on how to compress wordpress generated pages I found your simple solution that just work in the way we wanted.

    Thank you for sharing.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Allowed tags:
You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Data Recovery