Updated: 28 September 2026 · Applies to: cPanel & WHM 138 (EasyApache 4, AlmaLinux 9)

APCu is a memory cache for PHP applications: data is stored in RAM and shared between requests. Use it alongside OPcache (which caches compiled code); it is not a replacement. The current version is APCu 5.1.

cPanel & WHM server (root): PHP PECL

  1. In WHM, open Software › Module Installers and click Manage next to PHP PECL.
  2. Choose the PHP version (for example ea-php83).
  3. Enter apcu in Install a PHP PECL and click Install Now.
  4. Repeat for each PHP version your sites use.

From SSH the same is /opt/cpanel/ea-php83/root/usr/bin/pecl install apcu. PHP-FPM is restarted for you when you use WHM; after a command-line install, restart it with /scripts/restartsrv_apache_php_fpm.

Configure

Set the memory size in WHM › Software › MultiPHP INI Editor (Editor Mode) or in /opt/cpanel/ea-php83/root/etc/php.d/, for example apc.shm_size=64M. To use it from the command line (for example Nextcloud cron jobs), add apc.enable_cli=1.

Check

/opt/cpanel/ea-php83/root/usr/bin/php --ri apcu

Note: With PHP-FPM each account has its own pool, and each pool its own APCu memory. Keep apc.shm_size modest on servers with many accounts.

cPanel account (CloudLinux PHP Selector)

If your hosting shows Software › Select PHP Version in cPanel, open it, go to Extensions, and tick apcu. The change applies at once.

Note: On Ucartz shared and reseller hosting you cannot install server software yourself. If an extension is not available in Software › Select PHP Version or Software › MultiPHP INI Editor, open a ticket and our support team will check it for you.

Related services

Managed cPanel VPS

cPanel included; we handle updates, security and monitoring.

cPanel server management

hardening, migrations and 24/7 monitoring, with no long-term contract.

cPanel, Plesk and LiteSpeed licences

for VPS and dedicated servers, with installation help on demand.

Was this answer helpful?

Still stuck? Open a ticket