How to enable PHP opcode caching

This article describes how to enable PHP opcode caching.

Although many server accounts already have opcode caching enabled by default, some accounts (for example, Turbo Reseller servers) do not.

About APC and OPcache

The Alternative PHP Cache (APC) and OPcache provide opcode caching. By caching the compiled operation codes (opcodes) of PHP scripts, APC and OPcache enable sites to serve page content significantly faster.

APC is a PHP extension that runs on PHP 5.4 and earlier versions. Because it is a separate extension, it may or may not already be installed on your server. For information about how to determine if APC is installed on your server, please see this article.

OPcache is a drop-in replacement for APC that runs on PHP 5.5 and later versions. OPcache is a core component built into PHP, so it does not require separate installation like APC does.

Enabling opcode caching

To enable opcode caching for your account, follow these steps:

  1. Log in to cPanel.
    If you do not know how to log in to your cPanel account, please see this article.
  2. In the SOFTWARE section of the cPanel home screen, click Select PHP Version.
  3. Select the check box next to the opcode caching extension you want to enable:
    • If you are using PHP version 5.4 or older, select apc.
    • If you are using PHP version 5.5 or newer, select opcache.
  4. Click Save. Opcode caching is now enabled.

More Information

Article Details

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

Usamos cookies con el fin de personalizar para usted nuestro sitio Web y analizar el uso de éste. Usted acepta esto haciendo clic en “Acepto” o al continuar usando el sitio Web. Hay más información sobre cookies en nuestra política de privacidad.