PHP website performance improve method

Here are some methods may help you to improve php the performance

1: object code cache

Each request need to recompile the object code, if you use the cache, then may avoided, so that you can make your php program to get faster.

The following programs can use:

A) Ioncube: http://www.ioncube.com/

B) Zend Encoder: http://www.zend.com/

C) Turckl MMCache: http://freshmeat.net/projects/turck-mmcache/

2:Template engine

Template engine provides another a different cache,Contents cache.If you have a lot of static data and the pages do not need to reload, template engine is very helpful. Template engine not only to improve the code execution time, but also make your maintenance easier.

A) Smarty Templates: http://smarty.php.net/

B) Pear Templates: http://pear.php.net/

C) PHP savant: http://phpsavant.com/

3: Distributed Object Caching

The most popular is Memcached

4: Setting php.ini file

variables_order = “GPC”
register_argc_argv = “Off”
register_globals = “Off”
always_populate_raw_post_data = “Off”
magic_quotes_gpc =”Off”

5: Output Compression

Almost all browsers support Gzip compression, gzip can reduce 80% of the output, expense of an increase of about 10% of the cpu computation. But it not only reduces bandwidth, and you will become very quickly the page loads.

You may open it in php.ini:

zlib.output_compression = On
zlib.output_compression_level = (level)(level may be a number between 1-9, you can set different numbers makes it suitable for your site.)

If you are using apache, you can also activate the mod_gzip module, he is highly customizable

6:Other

When you use the database when the only quote that you need to use the data, avoid using select * from mytable such as SQL.
In addition the use of the index is also helpful.

Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

2 Comments on "PHP website performance improve method"

commenter

Hi Everyone, i’m a first time visitor.I really like your website. I was wondering about your story, this is great stuff. Thank you.

commenter

Hey, I really like your info.. I was wondering if you used a webdesigner or if you created this site yourself. good job.

Leave a Reply

Name:
Email:
Website:
Comment:
XHTML: 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>