If both of the following symptoms apply to you:
- If you have MonsterInsights version 5.4 or MonsterInsights version 5.5
- You can’t deactivate, delete or upgrade MonsterInsights. (The issue is therefore related to files changing.)
The Problem is most likely OPcaching being implemented by your hosting provider.
Opcaching is the hosting provider caching the PHP in order to speed up execution
How to Get MonsterInsights Updated
You’ll need to ask your hosting provider to clear the OPcache and ideally remove the old plugin for you.
It’s a problem because the old plugin you have–Yoast’s version–uses a PHP autoloader that allows for OPcaching in a way that when the plugin is attempted to be upgraded or removed, it will keep looking for files that no longer exist.
We don’t have this problem with the newer versions MonsterInsights, because we’ve rewritten it to not have that problem.
So, once you upgrade MonsterInsights, you won’t have this problem again since MonsterInsights 6 does not to use the old Yoast loader.
Long Term Solution: Consider changing hosts, because this is typically a symptom of a bad hosting. Our sister site WP Beginner has some recommendations for WordPress Hosting.
That’s it! Now you know how to get that OPcaching issue solved! Interested in learning how to check for plugin conflicts? See our guide How To Check For Plugin Conflicts.