How to make your MU website(and other sites) load much faster
this guide will help you make your site load much faster using php and gzip
lets start
1. check if your website is gzipped or not by going to this site
2. type your Web Page URL and press check
3. if the result says that your website is compressed is Yes then you should stop here. your site is already optimized.
4. if the result says that your website is compressed is No then proceed with the next step
5. go to your htdocs web folder(in my case, i use htdocs/muweb)
6. open index.php with your favorite editor(notepad, wordpad, ultraeditor, dreamweaver etc)
7. at the top of the page, insert this line
Quote:
ob_start("ob_gzhandler");
right after
so it should look like this
Quote:
<?
session_start();
ob_start("ob_gzhandler");
if you cant find session_start();
just insert it below <?
8. then go back to step 1
goodluck!!!
Re: [Guide] How to make your MU website(and other sites) load much faster
have anyone tried it yet?
did you noticed any diference?
Re: [Guide] How to make your MU website(and other sites) load much faster
Re: [Guide] How to make your MU website(and other sites) load much faster
Re: [Guide] How to make your MU website(and other sites) load much faster
Tried and it works, thanks.
Re: [Guide] How to make your MU website(and other sites) load much faster
Nice Guide..It really works!
Re: [Guide] How to make your MU website(and other sites) load much faster
Re: [Guide] How to make your MU website(and other sites) load much faster
here's another webserver optimization
get your self a copy of eaccelerator.dll
put it somewhere in your folder(preferably php\ext folder)
then open your php.ini
go to the bottom of the file then paste this if you dont have it yet
Quote:
[eAccelerator]
extension="APACHE FOLDER HERE\php\ext\eaccelerator.dll"
eaccelerator.shm_size = "0"
eaccelerator.cache_dir = "TEMP FOLDER HERE\tmp"
eaccelerator.enable = "1"
eaccelerator.optimizer = "1"
eaccelerator.debug = "0"
eaccelerator.check_mtime = "1"
eaccelerator.filter = ""
eaccelerator.shm_max = "0"
eaccelerator.shm_ttl = "0"
eaccelerator.shm_prune_period = "0"
eaccelerator.shm_only = "0"
eaccelerator.compress = "1"
eaccelerator.compress_level = "9"
eaccelerator.keys = "shm_and_disk"
eaccelerator.sessions = "shm_and_disk"
eaccelerator.content = "shm_and_disk"
if you already have this in your php.ini then it is already optimized
just remove the ";"
restart php and you're done
Re: [Guide] How to make your MU website(and other sites) load much faster
The 1st method increases page loading with about 0,3 seconds.
Re: [Guide] How to make your MU website(and other sites) load much faster
Re: [Guide] How to make your MU website(and other sites) load much faster
Quote:
Originally Posted by
jduval
how did you measure it?
Google it :P , there are lots of website speed test
And for the optimizer, I recomend that if you have a page with lots of content , use the value "9" .
Re: [Guide] How to make your MU website(and other sites) load much faster
If you are using a different web page with php scripts not loaded by the index you might to want to do this
goto path_to_php_ini/php.ini
find and set...
/////////////////////////////////////////////
zlib.output_handler =
->
zlib.output_handler = ob_gzhandler
/////////////////////////////////////////////
zlib.output_compression =
->
zlib.output_compression = on
/////////////////////////////////////////////
zlib.output_compression_level =
->
zlib.output_compression_level = -1
/////////////////////////////////////////////
Restart the apache web server. Done.
Using this method you will get every file compressed using the gzip handler automatic.
Re: [Guide] How to make your MU website(and other sites) load much faster
thanks men the first metod work very fine for me
Re: [Guide] How to make your MU website(and other sites) load much faster
Apache 2.0 and 2.2 use mod_deflate instead gzip compression :
Speed up Apache 2.0 web access or downloads with mod_deflate :
Speed up Apache 2.0 web access or downloads with mod_deflate | nixCraft
A cache system can increase website performance and reduce network traffic :
Apache 2.0 :
mod_cache - Apache HTTP Server
Apache 2.2
mod_cache - Apache HTTP Server
Optimize your code : HTML / PHP code contains unnecessary stuff: unneeded spaces, returns, meta tags, default values in HTML elements, etc
HTML Code Cleaner is intended to optimize HTML documents, resulting in shorter downloading / uploading time. Pages will appear in client's Internet browser in the same way, but they will be about 20%-40% smaller.
HTML Code Cleaner, HTML Code Compress - optimize and shrink HTML files
Re: [Guide] How to make your MU website(and other sites) load much faster