• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question PHP 8.X and OPCache

Fabhino22Elz

Basic Pleskian
Server operating system version
CentOS Linux 7.9.2009
Plesk version and microupdate number
Plesk Obisidan 18.0.49 Update #2
Hey everyone,
we just moved from PHP7 to PHP8 and want to ask if there is a manual how to configure OPCache correctly for the usage with PHP8. I could not find a matching manual for it, so far :(
THX for your help! :)
 
On your PHP configuration page in Plesk there should be a line "opcache.enable" that you can set to "on" or "off". This is available for all PHP versions from at least 5.6 on upwards. What other configuration are you missing?
 
Again - Thank you for your answer :)

I already did that. What I was wondering is - there are many additional configuration lines for the OPCache and I would like to know, what needs also to be activated or adjusted in its value for an optimized OPCache working.
 
Hi @YourShopPartner,

Default settings should be fine but you could always adjust via the Additional Directive section for the PHP Settings in Plesk. If you want to see what the current settings are, you can always click on the "View the phpinfo() page" link in the PHP Settings of the domain and look at it.
 
on the php settings of the domain under disable functions, remove opcache_get_status , otherwise most apps, like WordPress won't work with opcache
 
on the php settings of the domain under disable functions, remove opcache_get_status, otherwise most apps, like WordPress won't work with opcache
That's incorrect. Opcache does not require any special plugin or extension to be installed on your website. If opcache is enabled (which it is by default on Plesk) it works for ALL websites running PHP without the need for any additional configuration. It functions without problems if other opcache function are disabled, like the opcache_get_status function.

Beware that disabling opcache_get_status can be a security threat. The cache is shared for all sites running the same PHP handler. The opcache_get_status function allows you to see which PHP files (called scripts) are cached. Not only for your own site, but files from other domains too. If you're hosting multiple websites for different people (ie clients/customers) you want to might want to keep opcache_get_status disabled.
 
Last edited:
Back
Top