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
- In WHM, open Software › Module Installers and click Manage next to PHP PECL.
- Choose the PHP version (for example
ea-php83). - Enter
apcuin Install a PHP PECL and click Install Now. - 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.