2017-10-19 9 views
3

우분투에서 Wordpress의 새로운 인스턴스를 사용하여 these instructions을 통해 wp-cli을 설치했습니다. 나는 downloading the .phar package, chmodding it, etc을 시도했다. 나는 또한 installing a .deb package을 시도했다. wp plugin update --all --debug을 실행할 때 두 경우 모두에서 나는 같은 오류를 얻을 : 나는 list of support options를 통해 실행 한AW-Lightsail에 Bitnami의 Wordpress를 설치할 때 WP-CLI가 호환되지 않습니까?

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에서 제대로 작동하도록 드릴 수 없습니다. githubwordpress.org forums을 보면 많은 사용자가 위의 오류 중 일부 또는 전부를 갖고있는 것으로 나타났습니다.

  • wp-config.php : 조건에 ABSPATH 줄을 줄 바꿈했습니다.
  • wp-config.php : add_filter() 호출을 MU 플러그인으로 이동하십시오.
  • 여러 chmodchown이 변경됩니다.

이들 중 일부는 해당 오류가 멀리 갈 수 있도록 못했지만, wp은 여전히 ​​플러그인을 업데이트 할 수 없습니다 등

나는 PHP 디버그 출력에서 ​​식별 된 누락 된 파일을 작성해야합니까?

AWS Lightsail/Bitnami를 사용하지 않아야합니까? 난 단지 wp-cli이 필요해. 그래서 나는 ec2 나 다른 어떤 곳으로 옮기려고한다.

답변

2

Bitnami 개발자는 여기에 있습니다.

daemon 사용자로 명령을 실행 해보십시오.

sudo su -s /bin/bash daemon 

이 서버에 쓸 수있는 권한이있는 사용자

+0

그것이 해결책이었습니다. 고맙습니다! sudo su -s/bin/bash 데몬 export PATH =/opt/bitnami/varnish/bin :/opt/bitnami/sqlite/bin :/opt/bin/bash 데몬은 다음과 같이 순서대로 수행해야합니다./usr/local/bin :/usr/local/bin :/opt/bitnami/sbin :/usr/bin :/sbin :/bin :/usr/games :/usr/local/games cd/home/bitnami/apps/wordpress/htdocs wp 플러그인 업데이트 --all --debug . .. 성공 : 5 플러그인 중 5 개가 업데이트되었습니다. ' –

+0

내 솔루션 사용에 대한 내 형식이 올바른지 확인하십시오. 다시 한번 감사드립니다. –

4

두 가지 문제가 있습니다. 당신은 당신의 wp-config.php 파일에 $_SERVER['HTTP_HOST']을 사용하고

  1. , WP-CLI가 실행되는 동안 설정되지 않은 . WP-CLI는 명령 줄 도구로 실행되므로 웹 전용 PHP 상수/변수 중 일부는 으로 설정되지 않았습니다. 수동으로 설정하거나 조건부 대체를 제공해야합니다.

  2. WordPress는 다운로드 한 플러그인 보관 파일 을 압축 해제 할 디렉토리를 만들 수 없습니다. 위의 1. 때문일 수 있습니다 ( WordPress가 잘못된 위치에서 발견했을 수 있음) 에 필요한 권한이없는 다른 사용자와 함께 WP-CLI를 실행하는 것과 같은 관련없는 문제인 일 수 있습니다.

두 가지 문제는 WP-CLI에 의해 직접적으로 발생하는 것이 아니라 WordPress 설치의 특정 설정 결과입니다.

+0

wp plugin update --all --debug 감사합니다. Wordpress의 Bitnami 설치와 함께 제공되는'wp-config.php' 파일을 사용하고 있습니다. WP-CLI와 호환되는이 파일의 버전을 다운로드하거나 만들 수 있습니까? –

+1

해당 파일에 무엇이 포함되어 있는지 알 수 없습니다. 나는 거기에 몇 가지 특별한 설정이 있다고 가정해야한다. 그래서 표준 설정 파일을 다운로드하면 아마 문제가 생길 것이다. –

2

당신에게 하비에르 Salmeron 감사합니다!여기에 내가 위해해야 ​​할 일을했을 정확히 무엇인가 : 다음과 같은 사실 때문에

sudo su -s /bin/bash daemon 

export PATH=/opt/bitnami/varnish/bin:/opt/bitnami/sqlite/bin:/opt/bitnami/php/bin:/opt/bitnami/mysql/bin:/opt/bitnami/apache2/bin:/opt/bitnami/common/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games 

cd /home/bitnami/apps/wordpress/htdocs 

가 지금은 일 :

  1. 내가 사용자 daemon했다.
  2. $PATH/opt/bitnami/php/bin/php입니다.
  3. 나는 올바른 디렉토리에 있었다 : /home/bitnami/apps/wordpress/htdocs

다음 명령은 성공적으로 실행 :

Debug (bootstrap): No readable global config found (0.058s) 
Debug (bootstrap): No project config found (0.059s) 
Debug (bootstrap): argv: /usr/local/bin/wp plugin update --all --debug (0.059s) 
Debug (bootstrap): ABSPATH defined: /opt/bitnami/apps/wordpress/htdocs/ (0.059s) 
Debug (bootstrap): Begin WordPress load (0.061s) 
Debug (bootstrap): wp-config.php path: /opt/bitnami/apps/wordpress/htdocs/wp-config.php (0.061s) 
Debug (bootstrap): Loaded WordPress (0.678s) 
Debug (bootstrap): Running command: plugin update (0.679s) 
PHP Warning: mkdir(): Permission denied in phar:///usr/local/bin/wp/php/WP_CLI/FileCache.php on line 265 
Warning: mkdir(): Permission denied in phar:///usr/local/bin/wp/php/WP_CLI/FileCache.php on line 265 
Downloading update from https://downloads.wordpress.org/plugin/akismet.4.0.zip... 
Unpacking the update... 
Installing the latest version... 
Removing the old version of the plugin... 
Plugin updated successfully. 
Downloading update from https://downloads.wordpress.org/plugin/all-in-one-wp-migration.6.59.zip... 
Unpacking the update... 
Installing the latest version... 
Removing the old version of the plugin... 
Plugin updated successfully. 
Downloading update from https://downloads.wordpress.org/plugin/all-in-one-seo-pack.2.4.2.zip... 
Unpacking the update... 
Installing the latest version... 
Removing the old version of the plugin... 
Plugin updated successfully. 
Downloading update from https://downloads.wordpress.org/plugin/google-analytics-for-wordpress.6.2.4.zip... 
Unpacking the update... 
Installing the latest version... 
Removing the old version of the plugin... 
Plugin updated successfully. 
Downloading update from https://downloads.wordpress.org/plugin/jetpack.5.4.zip... 
Unpacking the update... 
Installing the latest version... 
Removing the old version of the plugin... 
Plugin updated successfully. 
+--------------------------------+-------------+-------------+---------+ 
| name       | old_version | new_version | status | 
+--------------------------------+-------------+-------------+---------+ 
| akismet      | 3.3.4  | 4.0   | Updated | 
| all-in-one-wp-migration  | 6.55  | 6.59  | Updated | 
| all-in-one-seo-pack   | 2.3.15  | 2.4.2  | Updated | 
| google-analytics-for-wordpress | 6.2.0  | 6.2.4  | Updated | 
| jetpack      | 5.2.1  | 5.4   | Updated | 
+--------------------------------+-------------+-------------+---------+ 
Success: Updated 5 of 5 plugins.