我是否需要一些额外的WP-CLI捆绑包来通过命令行激活mu插件?我在文件里找不到关于这方面的任何东西。WP-CLI对mu插件的处理是否有所不同?
我创建了/wp-content/mu-plugins/my-plugin.php
包含:
<?php
/*
Plugin Name: My Plugin
Description: Provide must-use code.
Version: 1.0
*/
当我这样做时:
$ wp plugin list
我得到:
+---------------+----------+--------+---------+
| name | status | update | version |
+---------------+----------+--------+---------+
| akismet | inactive | none | 4.0.8 |
| hello | active | none | 1.7 |
| my-plugin | must-use | none | 1.0 |
+---------------+----------+--------+---------+
但当我这样做时:
$ wp plugin activate my-plugin
我得到:
Warning: The \'my-plugin\' plugin could not be found.
Error: No plugins activated.