Using Craft CMS plugins

Published

Updated

Install Craft CMS plugins in the local development environment, then deploy. The software template blocks plugin installs on fortrabbit.

Install plugins from the control panel

The plugin store in the local control panel finds, installs and buys plugins in one place:

  1. Open the control panel of the local Craft installation
  2. Go to the plugin store
  3. Search, install and activate the plugin

The plugin store adds the plugin to composer.json. Commit composer.json, composer.lock and config/project, then deploy: the build runs composer install and the post-deploy commands apply the project config, which installs the plugin on fortrabbit. On fortrabbit, CRAFT_ALLOW_ADMIN_CHANGES=false makes the plugin store read-only and locks the plugin versions, see production settings.

Install plugins in the terminal

composer require {vendor/package-name}
php craft plugin/install {plugin-handle}
shell

Update plugins like Craft itself, see updating Craft CMS.

Image optimization plugins

Image transforms cost CPU time, and so do optimizers like jpegoptim or optipng. These tools are available in jobs, not in the web environment. Run them in a worker job, the way image transforms moves transforms there.

Plugins and performance

Each plugin adds code to every request, and some add database queries or queue jobs. Prefer few, small plugins. See Craft CMS performance.

Plugins and updates

A plugin without a release for a new Craft version blocks the Craft upgrade until the plugin catches up. Fewer plugins mean fewer of those waits.

Written by humans and AI in collaboration.

AI use & editorial processEdit on GitHub ↗