Plugins configuration
Page summary:
/config/pluginsenables or disables plugins and overrides their settings, with examples for local plugin development.
Plugin configurations are stored in /config/plugins.js|ts (see project structure). Each plugin can be configured with the following available parameters:
| Parameter | Description | Type |
|---|---|---|
enabled | Enable (true) or disable (false) an installed plugin | Boolean |
configOptional | Used to override default plugin configuration (defined in strapi-server.js) | Object |
resolveOptional, only required for local plugins | Path to the plugin's folder | String |
-
Some core features of Strapi have historically been implemented as core plugins. This explains that their configuration is still defined in the
/config/pluginsfile despite not technically being plugins in Strapi 5 anymore. This includes:- the Upload configuration for the package which powers the Media Library,
- and the Users & Permissions configuration.
The detailed GraphQL plugin configuration is also documented in its dedicated plugin page.
-
Additionally, providers configuration for the Media Library and the Email features are also defined in
/config/plugins. Their configurations are detailed in the Upload providers configuration and the Email providers configuration.
Basic example custom configuration for plugins:
- JavaScript
- TypeScript
module.exports = ({ env }) => ({
// enable a plugin that doesn't require any configuration
i18n: true,
// enable a custom plugin
myplugin: {
// my-plugin is going to be the internal name used for this plugin
enabled: true,
resolve: './src/plugins/my-local-plugin',
config: {
// user plugin config goes here
},
},
// disable a plugin
'my-other-plugin': {
enabled: false, // plugin installed but disabled
},
});
export default ({ env }) => ({
// enable a plugin that doesn't require any configuration
i18n: true,
// enable a custom plugin
myplugin: {
// my-plugin is going to be the internal name used for this plugin
enabled: true,
resolve: './src/plugins/my-local-plugin',
config: {
// user plugin config goes here
},
},
// disable a plugin
'my-other-plugin': {
enabled: false, // plugin installed but disabled
},
});
If no specific configuration is required, a plugin can also be declared with the shorthand syntax 'plugin-name': true.