Optimize your PHP website by making sure you use the following tricks
- Combine CSS files as much as possible
- Always place a favicon.ico (saves needless 404 request and file searches)
- If you use a lot of small images for your website make use of CSS Sprites
- Use GZIP compression
- Install APC (Alternative PHP Cache). This will speed your php up a lot
- if you don't use .htaccess or have control over the server remove .htaccess ability and set any options in your apache virtual host file.
- don't use current directory (".") in your include path but instead link directly to files in your code: include("./example.php")
- Watch how many include paths you have. It will search in every folder for to find include file.
- use persistent mysql connection (mysql_pconnect)
This list is based on the presentation of Rasmus Ledorf at Campus Party 2010 - http://talks.php.net/show/cp10. Out of this e've compiled a small checklist of things to do when you create a php website. This will make sure you will use all the simple tricks to make your website and PHP code to run fast. Further information on how to benchmark this look at the presentation of Rasmus.