Git Deploying – Disabling plugin/theme installation/update on remote?

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.

Leave a Comment