More geeky than girly.
Speed Up WordPress by Compressing Output
I’ve used dreamhost to host this website for years, but for some reason, wordpress runs extremely slowly on it. But I found some code to compress your php so I’m giving it a try. Does my page load a faster? Seems so to me, but maybe it’s just psychological.
First, place the following code in a file and call it “test.php” and then upload it to the root of your blog directory:
<?php phpinfo(); ?>
Make sure that “zlib” is enabled by your hosting provider.
Second, place the following code in your header (above the DOCTYPE):
<?php
ini_set('zlib.output_compression', 'On');
ini_set('zlib.output_compression_level', '1');
?>
If all’s well, make sure to delete that test.php file.
High five to wprecipes.com.
Related posts:
| Print article | This entry was posted by Jen on October 21, 2009 at 10:47 am, and is filed under Geek. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |