Configure Alternate PHP Cache (APC) for Drupal

APC is an op-code caching sytem for Apache servers. The more Drupal modules you enable, the greater the need for such PHP pre-processing. Most PHP accelerators work by caching the compiled bytecode of PHP scripts to avoid the overhead of parsing and compiling source code on each request (some or all of which may never even be executed). To further improve performance, the cached code is stored in shared memory and directly executed from there, minimizing the amount of slow disk reads and memory copying at runtime.

Please download the performance script below, to check on your APC installation. Be sure monitor performance: too little RAM available for APC will hurt your site performance!

Sensible default apc.ini settings

These settings provide 128MB of APC caching and should be enough for up to 100 Drupal modules
apc.apc.stat = 0
apc.include_once_override = 1


  • Speeds up Drupal script compilation
  • Reduces server resource usage


  • Requires custom server tuning