Not detecting updates with DISALLOW_FILE_MODS

I am aware that this is not an issue with MainWP per se, but I would like to write this down so it may help others and perhaps someone may come with a solution in the future.

So… I use DISALLOW_FILE_MODS in my websites so that they have another layer and protection and it blocks anyone from installing plugins. But it also stops WordPress from checking for updates and, in turn, MainWP cannot detect when a plugin has an update on that site.

A suggestion on how to test this: install an older version of a plugin, check for updates on MainWP. It should show there is an update available. Enable DISALLOW_FILE_MODS in WP-CONFIG.PHP. Then check for updates again. MainWP should not detect updates for that plugin.

Now, there is another thing I noticed: WP CLI can indeed see that there are updates even though DISALLOW_FILE_MODS is enabled.


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer