Do I need some extra WP-CLI bundle to activate mu-plugins via command line? I can't find anything about that in the docs. Are mu-plugins treated differently by WP-CLI?

I created /wp-content/mu-plugins/my-plugin.php containing:

<?php
/*
  Plugin Name: My Plugin
  Description: Provide must-use code.
  Version: 1.0
*/

When I do:

$ wp plugin list

I get:

+---------------+----------+--------+---------+
| name          | status   | update | version |
+---------------+----------+--------+---------+
| akismet       | inactive | none   | 4.0.8   |
| hello         | active   | none   | 1.7     |
| my-plugin     | must-use | none   | 1.0     |
+---------------+----------+--------+---------+

But when I do:

$ wp plugin activate my-plugin

I get:

Warning: The 'my-plugin' plugin could not be found.
Error: No plugins activated.
up vote 2 down vote accepted

my-plugins don’t get activated. They’re activated just by being in that folder.

  • mu-plugins - there's a typo. Can't edit that. – leymannx Sep 9 at 19:29

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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