Properly restart Opcache after deployment

When you are deploying code to a server and not with containers then it is critical to know how to properly restart Opcache. Why? Opcache never throws old files out of the cache. Therefore, if a new version is deployed in a completely new directory, all files from the old version will remain in the [...]

michael,
@michael@thms.uk avatar

@symfonystation I’ve been using systemctl restart php-from for a long time.

The problem with any of these other tools is that they always rely on some php code to refresh the opcache. But what if the opcache has an outdated version of that code cached?

I’ve been bitten by it a couple of times. So restart php-fpm is far more reliable for me.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • php
  • PowerRangers
  • DreamBathrooms
  • osvaldo12
  • magazineikmin
  • InstantRegret
  • everett
  • Youngstown
  • ngwrru68w68
  • slotface
  • rosin
  • GTA5RPClips
  • tester
  • kavyap
  • thenastyranch
  • provamag3
  • mdbf
  • ethstaker
  • cisconetworking
  • Durango
  • vwfavf
  • normalnudes
  • tacticalgear
  • khanakhh
  • modclub
  • cubers
  • Leos
  • anitta
  • megavids
  • All magazines