在 Ubuntu 上使用新的 Wordpress 实例,我wp-cli
通过这些说明安装。我尝试下载 .phar 包,对其进行 chmodding 等。我还尝试安装 .deb 包。在这两种情况下,我在运行时都会遇到相同的错误wp plugin update --all --debug
:
Debug (bootstrap): No readable global config found (0.057s)
Debug (bootstrap): No project config found (0.057s)
Debug (bootstrap): argv: /usr/local/bin/wp plugin update --all --debug (0.057s)
Debug (bootstrap): ABSPATH defined: /opt/bitnami/apps/wordpress/htdocs/ (0.058s)
Debug (bootstrap): Begin WordPress load (0.058s)
Debug (bootstrap): wp-config.php path: /opt/bitnami/apps/wordpress/htdocs/wp-config.php (0.058s)
PHP Notice: Undefined index: HTTP_HOST in phar:///usr/local/bin/wp/php/WP_CLI/Runner.php(1070) : eval()'d code on line 90
PHP Notice: Undefined index: HTTP_HOST in phar:///usr/local/bin/wp/php/WP_CLI/Runner.php(1070) : eval()'d code on line 91
Debug (bootstrap): Loaded WordPress (0.188s)
Debug (bootstrap): Running command: plugin update (0.188s)
Downloading update from https://downloads.wordpress.org/plugin/akismet.4.0.zip...
Using cached file '/home/bitnami/.wp-cli/cache/plugin/akismet-4.0.zip'...
Unpacking the update...
Warning: Could not create directory.
Downloading update from https://downloads.wordpress.org/plugin/all-in-one-wp-migration.6.58.zip...
Using cached file '/home/bitnami/.wp-cli/cache/plugin/all-in-one-wp-migration-6.58.zip'...
Unpacking the update...
Warning: Could not create directory.
Downloading update from https://downloads.wordpress.org/plugin/all-in-one-seo-pack.2.4.2.zip...
Using cached file '/home/bitnami/.wp-cli/cache/plugin/all-in-one-seo-pack-2.4.2.zip'...
Unpacking the update...
Warning: Could not create directory.
Downloading update from https://downloads.wordpress.org/plugin/google-analytics-for-wordpress.6.2.4.zip...
Using cached file '/home/bitnami/.wp-cli/cache/plugin/google-analytics-for-wordpress-6.2.4.zip'...
Unpacking the update...
Warning: Could not create directory.
Downloading update from https://downloads.wordpress.org/plugin/jetpack.5.4.zip...
Using cached file '/home/bitnami/.wp-cli/cache/plugin/jetpack-5.4.zip'...
Unpacking the update...
Warning: Could not create directory.
+--------------------------------+-------------+-------------+--------+
| name | old_version | new_version | status |
+--------------------------------+-------------+-------------+--------+
| akismet | 3.3.4 | 4.0 | Error |
| all-in-one-wp-migration | 6.55 | 6.58 | Error |
| all-in-one-seo-pack | 2.3.15 | 2.4.2 | Error |
| google-analytics-for-wordpress | 6.2.0 | 6.2.4 | Error |
| jetpack | 5.2.1 | 5.4 | Error |
+--------------------------------+-------------+-------------+--------+
Success: Plugins already updated.
我浏览了支持选项列表,但仍然无法让 wp-cli 在 AWS Lightsail(又名 Bitnami)上正常工作。查看github和wordpress.org 论坛,我发现很多用户都遇到了上述部分或全部错误。我尝试了所有建议的解决方法:
wp-config.php
: 将 ABSPATH 行包裹在条件中。wp-config.php
: 将add_filter()
调用移动到 MU 插件中。- 几个
chmod
和chown
变化。
其中一些确实使它们各自的错误消失了,但wp
仍然无法更新插件等。
我是否需要创建在 PHP 调试输出中标识的缺失文件?
我应该不使用 AWS Lightsail/Bitnami 吗?我真的需要wp-cli
,所以我愿意搬到 ec2 或其他任何地方。