Reseller Hosting

Offer Reseller Hosting

Get Deal

How to Resolve OPcache Issues in WHMCS

If you’re experiencing issues with your WHMCS installation, it’s possible that OPcache conflicts are the cause. As a reseller web host on a shared service, you don’t have the ability to disable PHP extensions entirely, as this could impact other users on the server.

OpCache warning banner shown in WHMCS
OpCache Warning

However, there is a workaround allowing you to disable the cache for specific cPanel accounts or individual WHMCS installations using the rules set in the .htaccess file.

Disabling OPcache via .htaccess

1. Log in to WHM, then access the cPanel account you want to modify. You can also use SSH or FTP to access the account and manipulate the file directly.

cPanel file manager in files
cPanel File Manager

2. Navigate to the root directory of your WHMCS installation, you would have created this during the installation process. Typically you can find it in /public_html/whmcs/ but you may have a different configuration.

WHMCS installation directory shown in cPanel
WHMCS Directory

3. Moving on, open or create .htaccess and add the following line to the end of the file.

.htaccess file shown highlighted with right click drop down indicating edit
.htaccess file
php_flag opcache.enable Off

4. Finally, make sure you save and then you can close your editor.

.htaccess file shown in open editor
.htaccess configured

Verifying the Change

As an additional step you can verify your changes have worked via WHMCS.

1. To start with, log in to your WHMCS admin panel.

2. From here, go to Utilities > System > PHP Info.

Utilities Drop down menu in WHMCS
Utilities Menu

3. You can use the search function to check for opcache.enable and confirm it is set to “off.”

OpCache Showing Disabled in phpinfo
phpinfo

If OPcache is showing as enabled after following this guide, try going over the steps again. Its possible a different file was edited or it there are issues with your .htaccess. This workaround, should address any OPcache-related issues with WHMCS without having to change PHP extension settings.