Speeding Up Your PHP Web Site
Google have recently announced that the speed of a web site is now used as a factor in determining its search rank. This is great news for the skillful PHP developer, since it allows you to gain an advantage over those not as dedicated to their art.
In this article I will show you some of steps I've taken to improve the performance of PhpRiot.com. These are all techniques you can easily adapt to your own web sites and web applications.
When I set out to speed up this web site, I used the Page Speed and YSlow plug-ins for Firebug as a basis (we'll look at these plug-ins shortly) for determing what to do. As a result, the key things that were looked at were as follows:
- Using a Content Delivery Network to serve web site files (such as CSS and images)
- Caching page data (both on the server and in users' web browsers)
- Automatically compressing returned content using Gzip
This article will show you how to implement each of these features in your own web site. The following figure shows you an indication of how the speed of PhpRiot improved as a result of implementing these features. This is part of the new report that appears in Google's webmaster tools.