[BlueOnyx:27336] Re: how to disable opcache
Michael Stauber
mstauber at blueonyx.it
Wed Nov 13 15:42:01 -05 2024
Hi Ken,
> Is there a way to disable opcache in php 8.1 ?
Yes.
If you want to turn it off globally, comment out all lines in
/home/solarspeed/php-8.1/etc/php.d/opcache.ini or remove that config
file entirely.
Or if you want to leave open a way to enable it again in the future,
just add this line to /home/solarspeed/php-8.1/etc/php.d/opcache.ini:
opcache.enable=0
But say you want to turn it off for a single Vsite only? And leave it on
for others?
Say the Vsite is named www.company.com, then create this file:
/home/sites/www.company.com/php.d/opcache.ini
And put this line in it:
php_flag opcache.enable Off
Then go to the GUI and in the Vsite management navigate to the PHP
settings of that Vsite. Without changing anything hit "Save" and the
settings from your /home/sites/www.company.com/php.d/opcache.ini will be
incorporated into whatever PHP config that particular site is using
(Apache VirtualHost for DSO, php.ini for suPHP or PHP-FPM pool file if
you're using PHP-FPM).
--
With best regards
Michael Stauber
More information about the Blueonyx
mailing list