Friday, June 20, 2014

Improve Performance in PHP based website

Some of the basics but essential for performance tuning to any PHP based website

  1. Reduce no of http requests in page.
  2. Index queries which takes too much time. Find expensive queries by activate MySQL slow query log. We can also easily identify which query not use index by specify additional parameter in my.conf reference.
  3. Use PHP function instead of MySQL function. i.e. CURDATE() function gives current date in MySQL use PHP Date function instead of that.
  4. Cache (very basic but it is worth to mention! ). i.e. APC, Memcache
  5. Browser cache is another way when we have less dynamic content.
  6. Minify JS and CSS to reduce document size. Document size mean total size of your HTML page.
If we take care above points we can get good performance for sure.
There was an error in this gadget