1

Coming from Drupal, we often use drush to download modules (plugins) and install them. For example this is what we might do using drush:

drush dl bootstrap mailchimp stripe-php

This would download the modules (plugins), then we'd have to install/enable them.

On CraftCMS the ./craft utility is great for installing, but not downloading. I know you can use composer require vendor/plugin-name — but that requires me to know the vendor name as well. This came up when I was applying a project.yaml file to a fresh CraftCMS install and it notified me that a bunch of plugins were not installed — but only gave me the plugin-name for each — meaning I would have to look up the vendor -or- search for each in the plugin store and install.

Is something like the drush dl command available with the ./craft cli utility at this time?

0

You can use the plugin/install command for the ./craft cli utility, I'm not sure if you're aware of this:

https://craftcms.com/docs/3.x/console-commands.html#plugin-install

You'll need to know the plugin's handle, but that's all you need. I've never tried specifying multiple plugins in the one command, but that's an easy one to test.

Now, as to why you're needing this is the real question. If you've got your workflow correct, you shouldn't need to be manually downloading/installing plugins with the cli anywhere other than local dev. Project config (if you're using it) and composer should handle all of this. Typically, a basic deployment is as follows:

composer install
./craft migrate/all
./craft project-config/apply

I guess it would help to know why you're downloading and not installing, and in which kind of environment this is happening.

1
  • Thanks for this @Andy. I was aware of the plugin/install function. The reason is I have a list of plugin names and a fresh install and was looking for a way to download en-masse a bunch of known plugins into the fresh craft installation.
    – Adrian
    May 7 at 18:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.