How to configure W3 Total Cache and APC in GoDaddy

APC is an opcode cache used by many sites to improve application performance. PHP is an interpreted language, and the scripts (such as the ones that comprise your WordPress site) are loaded, parsed, compiled into an opcode, and executed when called. This process can use an inordinate amount of resources on a busy site, especially one without caching, so we need to do what we can to optimize this process.

While installing APC on a dedicated server or VPS is a straightforward process, this post (the first in a series of Web Performance Optimization (WPO) posts for GoDaddy) outlines how to enable it on your GoDaddy shared web hosting account:

  • Log into your GoDaddy account and navigate to your hosting dashboard
  • Go to Tools > FTP File Manager
  • Locate the php5.ini file and make a copy by clicking the checkbox, clicking on the “html” directory on the left, and entering php5.ini.backup.txt as the file name
  • Look for a line mentioning apc.shm_size and if one doesn’t exist, add this: apc.shm_size = 64M
  • Make sure lines beginning with zend_optimizer and zend_extension are preceded by a semicolon
  • Save the file and then click the X in the top-right corner

And now we need to restart PHP:

  • Navigate to your hosting dashboard again
  • Click the “Launch” button that corresponds with the hosting account in question
  • Under “Stats & Monitors” click “System Processes”
  • Click “End Web” in the top
  • This will restart the PHP process on your account and you should now be able to cache against APC in W3 Total Cache