Tuning OPcache for WordPress performance on PHP-FPM

phpperformancewordpress

OPcache prevents repeated PHP parsing. It’s one of the highest-impact performance tuning steps for WordPress.

opcache.enable=1
opcache.memory_consumption=128
opcache.max_accelerated_files=10000

Restart PHP-FPM after changes:

sudo systemctl restart php8.3-fpm

Use PHP-FPM restart vs reload when reload isn’t enough.