> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Enabling PHP opcode caching

> Enable PHP opcode caching with our concise guide on APC and OPcache, plus links to related topics.

This article describes how to enable PHP opcode caching.

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

## 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](/docs/determining-if-apc-is-installed-on-a-server).

**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.
   > 📘 Note
   >
   > If you do not know how to log in to your cPanel account, please see [this article](/docs/accessing-cpanel).

2. On the **Tools** page, in the **Software** section, click **Select PHP Version**:\
   ![cPanel - Select PHP Version icon](https://static.hosting.com/kb/kb-cpanel-110-software-select-php-version.png)

   > 🚧 Important
   >
   > If you do not see the **Select PHP Version** icon, your server does not support this feature.

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

* For more information about OPcache, please visit [https://php.net/manual/en/book.opcache.php](https://php.net/manual/en/book.opcache.php).

## Related articles

* [Using APC or OPcache with WordPress](/docs/using-apc-or-opcache-with-wordpress)

* [Using APC or OPcache with Drupal](/docs/using-apc-or-opcache-with-drupal)

* [Using APC or OPcache with Joomla](/docs/using-apc-or-opcache-with-joomla)

* [Using APC or OPcache with Magento](/docs/using-apc-or-opcache-with-magento)

* [Using APC or OPcache with PrestaShop](/docs/using-apc-or-opcache-with-prestashop)
