↑ ↓ select, Enter open, Esc close

Check PHP OPcache settings

user@server
php -i | grep -E '^opcache\.(enable|enable_cli|memory_consumption|max_accelerated_files|validate_timestamps|revalidate_freq) '

Filters the central OPcache directives from the PHP configuration. Values that are too small for memory_consumption or max_accelerated_files cause scripts to be recompiled constantly on large WordPress installations. With validate_timestamps=0, PHP only detects changed files after FPM is reloaded.

Note: These are the command line values, where OPcache is usually disabled (enable_cli). The website uses the values from the FPM configuration.

Open question before approval: Die CLI-Werte können von PHP-FPM abweichen. Prüfen, ob für Plesk ein besserer Weg zur Abfrage der FPM-Werte genannt werden soll (etwa opcache_get_status per Testskript).

Also searched as

  • is opcache enabled
  • opcache memory too small
  • improve php performance

Related one-liners

All in PHP

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.