GZip or ZLib Compression
This is perhaps the easiest way to significantly increase the speed of your Wordpress websites without installing any plugins or trying to minify your website's code. For me, this resulted in my sites loading 3-4 times faster than what they did before.
A little bit of background before I give you the steps: ZLib will give you the chance to compress the PHP that is being transmitted after a visitor's request, resulting in a faster displaying time on the browser at the far end. It's a loss-less data-compression library and you don't have to worry about your content being compromised in any way.
To enable it follow the steps below:
STEP 1:
First you have to do a very quick check to make sure that your server has zlib enabled. You can do this by placing the following line into a text file (use notepad), saving it as test.php and then uploading it to your website's root directory on your server:
<?php phpinfo(); ?>
Visit this test page you've just uploaded (i.e. go to www.mysite.com/test.php) and it should give you all the details about the PHP running on your server. All you have to do is scroll down to the zlib header and just check that it is enabled. If it is enabled proceed straight to step 2, otherwise request from your host to enable it for you. ZLib is a feature that web hosts don't mind enabling, so do make this extra step, I can assure you it's worth the try.
STEP 2:
Log into your Wordpress Dashboard and then go to Appearance -> Editor and from all the available files, click on the header.php. Place the below two lines directly above your Doctype at the beginning of the file (and in between the ?php opening and ? closing statements).
<?php
ini_set(’zlib.output_compression’, ‘On’);
ini_set(’zlib.output_compression_level’, ‘1′);
?>
Make sure you update the file to save the changes. Now load your site and browse through your posts and pages. You should notice a huge difference (you can also test your website's address to see if zlib is properly enabled using this tool from WhatsMyIP.org)! Let me know in the comments below.
Join the Discussion
Write something…
Pobman
Premium
I would not suggest most people run with W3 Total Cache, unless your server is setup right you will not see all the improvements from this plugin and you can actually make things worse. If you install it and you only have options for Disk caching, i.e. no APC etc. then I would just jump ship to Super Cache which pretty much works out of the box.
Running with the CDN though is a massive improvement for most people, I now run most sites with static content on cloudfront and the difference is out of this world.
FYI Cloudfront have added Sydney Australia to their CDN... makes them a winner in my book!
Nice guide though.
Running with the CDN though is a massive improvement for most people, I now run most sites with static content on cloudfront and the difference is out of this world.
FYI Cloudfront have added Sydney Australia to their CDN... makes them a winner in my book!
Nice guide though.
Denisara
Premium
smush it doesnt appear to work. it does nothing if I 'mass smush' and if I do them one at a time (and I have 364 pics) it times out. any suggestions? here is the error message I am getting: Automatic smushing has been disabled temporarily due to an error. Operation timed out after 20071 milliseconds with 0 bytes received
i tried a few more pics to "smush" and now they show up "BLANK" how do i get them back? this does NOT work
case in point:
http://bonestrivia.com/bones-season-eight-begins/bones-season-eight
this is one pic "smushed" out of about 12 that i tried this on. how do you reverse this ??????
i guess i have to redo that work completely if I want pictures to show UP
i tried a few more pics to "smush" and now they show up "BLANK" how do i get them back? this does NOT work
case in point:
http://bonestrivia.com/bones-season-eight-begins/bones-season-eight
this is one pic "smushed" out of about 12 that i tried this on. how do you reverse this ??????
i guess i have to redo that work completely if I want pictures to show UP
Denisara
Premium
funny, I was told that W3 Total Cache is a mistake to use unless you get like over 10k visitors per month by either Jay, Kyle or Carson...among others. The rest of what you say to do does not make sense to a newb such as myself but thanks for the article...maybe it will help someone else
morlandroger
Premium
WOW this is very comprehensive! Will come back to it and look at some of my sites again with a view to speeding up load times. Thanks for this