Is there any way to disable the installation/updating of plugins in WordPress?
I am deploying by Github, and therefore changes on server, does not replicate on my development environment.
I need to disable this, and make all updates and installations on my local Git repository, and THEN push to production, with the changes.
Set the constant DISALLOW_FILE_MODS
to TRUE
in your wp-config.php
:
const DISALLOW_FILE_MODS = TRUE;
See the Codex for background information:
Setting this constant also disables the Plugin and Theme editor (i.e. you don’t need to set DISALLOW_FILE_MODS
and DISALLOW_FILE_EDIT
, as on its own DISALLOW_FILE_MODS
will have the same effect).
It will also prevent installing or uninstalling plugins, themes and updating the WordPress core.
This will not affect the Git deployment.