I hadn't allowed Craft to update for a while, and then did, but it broke on a plugin, and I couldn't get into the CP. I figured out which plugin was causing the problem, it turned out I wasn't using it, so I disabled it in craft/config/general.php as follows:

return [
    '*' => [
        'disabledPlugins' => ['embedded-assets-link'],

That enabled me access to the CP, but, being disabled, I couldn't uninstall it through the CP, as explained here.

I tried many things, including

  • remove references to the plugin in craft/vendor/craftcms/plugins.php
  • removed references to the plugin from composer.json
  • run composer update

and probably some other nonsense.

So, having done it the hard way, I'd like to ask, is there a correct way to remove a plugin which cannot be enabled ('cause it's broken) ?

  • 1
    I think you can use one single command composer remove vendor/package/name as you have the access of SSH
    – inrsaurabh
    Nov 3, 2020 at 8:35

1 Answer 1


You will need to enable it to uninstall it but you can do everything via CLI.

First ./craft plugin/enable plugin-handle then ./craft plugin/uninstall plugin-handle then composer remove namespace/package-name.

If you really can't enable it as above, you'd need to composer remove namespace/package-name and manually remove any references in your plugins table, project config as well as any tables the plugin may have created on install.

  • Thank you. After posting, it dawned on me that, as you mention, without enabling the plugin, it can't do its own cleanup upon uninstalling.
    – kr37
    Nov 3, 2020 at 19:40

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.