Best OPcache settings: A Good Starting Point (2023)

When configuring your server settings for best performance, you have to look at every option available. Typically, OPcache should already be enabled along with its default settings.

When I do any optimizations, I like to do some searching around the web to see what others are doing. I’ll find a few different results and compare.. then I start my own configuration testing. And by the way, I’m using OPcache for WordPress sites.

OPcache really doesn’t need any extreme configuration differences like you might deal with when optimizing something like InnoDB. It’s really only a few settings that need adjusted. Here’s a good starting point I came up with. You can even go higher based on your server capabilities.

; My custom Opcache settings


Remember to keep an eye on changelogs. Over time default settings will be changed and sometimes removed completely. You can view default settings here along with changes that occur,

I found this link to be a good reference that you may want to bookmark,

Notify of
Inline Feedbacks
View all comments