Reduce CPU load with Alternative PHP Cache

alternative php cachePHP is by far the most popular scripting language for dynamic web pages but it is not the most efficient language. Each time a PHP page is accessed it has to be:

  • Parsed by the interpreter
  • Converted into intermediary format called opcode
  • Converted into machine code for your server’s CPU to execute it

If the same script is accessed 100 times these steps are repeated a 100 times. To avoid this repetition and waste of server resources you can use the Alternative PHP Cache or APC.

APC is a PECL extension that caches frequently accessed PHP files code in opcode format for faster execution thereby reducing CPU load on your web server. In this guide I write about how to install and configure APC.

Continue reading

Yes WWW! No WWW!

Most websites on the Internet can be accessed using both just their domain name and the www subdomain and domain name. For ex: www.example.com and example.com may lead to the same website. Some search engines consider the www version and the non-www version to be seperate websites and assign different Search Engine Results Page (SERP) positions and or page rank to them. This often results in a split page rank where the non-www and www versions of a site have different page rank. To prevent something like this from happening it helps to canonicalize your website URL. This means that you should select one version as a standard and redirect from the other to it.

Continue reading