Skip to content

Clearing Opcache

The Stratus CLI can also be used to clear the opcache instead of this method.

If your code deploys use symlinks or you think something is cached in the PHP opcache, you can clear it via the php-fpm port.

On all Stratus sites, the hostname:port is phpfpm:9000.

To use Cachetool, configure these settings in .cachetool.yml:

adapter: fastcgi
fastcgi: php-fpm:9000
temp_dir: /srv/tmp

For PHP 7.0.x, download the following file:

wget -c https://github.com/gordalina/cachetool/raw/gh-pages/downloads/cachetool-3.2.1.phar

For PHP 7.1 or 7.2, download:

wget -c http://gordalina.github.io/cachetool/downloads/cachetool.phar

The file must be renamed .cachetool.yml. CacheTool will look for this file in the current directory.