Reduce Wordpress Bandwidth Consumption

lair360

New Member
Messages
200
Reaction score
0
Points
0
Copyright Notice: This tutorial was published by Lair360.
There shall be no re-post of this article. Any attempt to steal this article is a criminal offence!

I had a couple of Chinese and European users stealing my articles without proper permission. As a result, I had asked their hosting service to shut down their website, so that they could remove any copyrighted materials.

Thank you very much for your support.

Lair360,
http://lair360.co.uk/blog/

------------------------------------
Version: 13.1
Revision: 32 Build 11

Reduce Wordpress Bandwidth Consumption

Introduction: this small article was brought up in my head when I was reading: “JavaScript Tutorial for Dummies”. But, after reading I got pretty bored and wrote this article!

This tutorial will help you to reduce your Wordpress monthly bandwidth by 35% or more.
It will also depends if you have “htaccess + rewrite” enabled and GZip module enabled.
However, this script will only compress php files and formats…

1.] Login to your Cpanel and backup your SQL database and your header.php file.

2.] Download notepad++ from the original author or from a mirror and install the software.
——————————-
http://sourceforge.net/projects/notepad-plus/
http://filehippo.com/download_notepad/
——————————-

3.] Open a file with Cpanel or download the file and open it with notepad.
But, don’t forget to make a backup!

4.] Copy this code and paste it into “header.php”, which is located in your theme’s directory.

Notes: this script will check whether your browser supports Gzip, if yes, then it send “ob_gzhandler” method which is similar to the other source code: “ob_start” method, which controls the output.

—Copy Source Code—

Code:
<?php
	if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'))
		ob_start("ob_gzhandler");
	else
		ob_start();
?>

—End Source Code—
Copyright 2001-2009 Lair360

5.] Save the file and check your websites’ performance…

6.] Done!
 
Top