How to Temporarily Disable a Plugin

If you suspect a plugin is causing issues for your Craft project, you can temporarily disable it from the control panel, or via configuration.

Control Panel #

Log in to the control panel with an Admin account, and navigate to SettingsPlugins.

Disabling a plugin via the control panel is only possible in environments where project config can be changed, which is usually a product of the allowAdminChanges setting. As an additional safety-net, only Admin users are allowed to install, enable, uninstall, and disable plugins.

The “Plugins” link within Craft’s Settings page

The Settings screen of the Craft control panel, with the Plugins section highlighted.

Find the plugin you wish to disable, click on its action menu, and select Disable.

Project config changes must be deployed and applied on other environments to take effect.

A plugin’s listing on the Settings → Plugins page, with its action menu expanded

Configuration #

If you would prefer to not alter project config (say, to test something in local development), or you want to ensure a plugin is disabled irrespective of project config, you can use the normal Craft configuration files.

Plugins disabled through code cannot be re-enabled via the control panel—the Enable option will be greyed out.

Via General Config #

Use the disabledPlugins setting in your general.php config file to disable one or more plugins. The setting accepts an array of plugin handles:

return GeneralConfig::create()
    // ...
    ->disabledPlugins([
        'aws-s3',
        'ckeditor',
    ])
;

Via .env #

In Craft 4, the environmental config override for disabledPlugins is CRAFT_DISABLED_PLUGINS.

CRAFT_DISABLED_PLUGINS="aws-s3,ckeditor"

Environment variables don’t natively support arrays, so plugin handles must be separated by commas.

Not sure what a plugin’s handle is? Run php craft plugin/list to get a report of the plugin packages available to your project. Prior to Craft 3.7.31 (when this command was added), you can look under the plugins key of your main project config file, config/project.yml.

Applies to Craft CMS 4 and Craft CMS 3.