Short answer: In cPanel Select PHP Version, enable the 'opcache' extension checkmark to cache precompiled bytecode in shared RAM, boosting application execution speeds up to 3x.
Accelerate PHP execution and reduce server load by enabling Zend OPcache bytecode caching through CloudLinux PHP Selector.
Before you start: Back up your site files and database and download the backup to your own computer. How to take a full backup
Quick reference
| Extension Name | opcache (under Select PHP Version > Extensions) |
|---|---|
| Benefit | Eliminates PHP script parsing overhead by compiling scripts into bytecode in RAM |
| Cache Reset | Restart PHP-FPM or re-save PHP Selector extensions |
Steps
- Open PHP Selector: Navigate to Software > Select PHP Version in cPanel.
- Access Extensions Tab: Ensure you are on the Extensions tab.
- Enable OPcache: Scroll down the list of PHP modules to find
opcache. Check the box to activate it. The change takes effect immediately without restarting the server. - Verify Status: In WordPress, go to Tools > Site Health > Info > Server and verify that Zend OPcache shows as Active.
Troubleshooting and tips
- Code changes not showing after editing files: OPcache stores compiled PHP bytecode in memory. If your edits to a PHP file do not reflect immediately, re-save your PHP Selector configuration or touch the modified file to update its timestamp.
Need more help? If you run into an error while following these steps, open a ticket with technical support and our team will look into it. Open a ticket