#php #wordpress
#php #wordpress
Вопрос:
Я выполнил новую установку WordPress на AWS Elastic BeanStalk.
Я не использую корневой каталог. Я переместил код WordPress в общедоступный каталог.
Я не могу открыть страницу, чтобы добавить или отредактировать сообщение / страницу.
Я получаю приведенную ниже ошибку в журналах Nginx.
Я пробовал как WordPress 5.5.3, так и 5.4.4
Есть какие-либо подсказки, в чем может быть проблема?
2020/12/04 12:24:47 [warn] 13851#0: *65 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/fastcgi/8/00/0000000008 while reading upstream, client: 103.5.133.148, server: , request: "GET /wp-admin/post-new.php?post_type=page HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/www.sock:", host: "blog-env.eba-gnu2jhwn.us-east-1.elasticbeanstalk.com", referrer: "http://blog-env.eba-gnu2jhwn.us-east-1.elasticbeanstalk.com/wp-admin/upload.php"
2020/12/04 12:24:48 [error] 13851#0: *68 open() "/var/www/html/public/wp-includes/js/dist/vendor/wp-polyfill.min.js" failed (2: No such file or directory), client: 103.5.133.148, server: , request: "GET /wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=7.4.4 HTTP/1.1", host: "blog-env.eba-gnu2jhwn.us-east-1.elasticbeanstalk.com", referrer: "http://blog-env.eba-gnu2jhwn.us-east-1.elasticbeanstalk.com/wp-admin/post-new.php?post_type=page"
2020/12/04 12:24:48 [error] 13851#0: *69 open() "/var/www/html/public/wp-includes/js/dist/vendor/lodash.min.js" failed (2: No such file or directory), client: 103.5.133.148, server: , request: "GET /wp-includes/js/dist/vendor/lodash.min.js?ver=4.17.15 HTTP/1.1", host: "blog-env.eba-gnu2jhwn.us-east-1.elasticbeanstalk.com", referrer: "http://blog-env.eba-gnu2jhwn.us-east-1.elasticbeanstalk.com/wp-admin/post-new.php?post_type=page"
2020/12/04 12:24:49 [error] 13851#0: *68 open() "/var/www/html/public/wp-includes/js/dist/vendor/react.min.js" failed (2: No such file or directory), client: 103.5.133.148, server: , request: "GET /wp-includes/js/dist/vendor/react.min.js?ver=16.9.0 HTTP/1.1", host: "blog-env.eba-gnu2jhwn.us-east-1.elasticbeanstalk.com", referrer: "http://blog-env.eba-gnu2jhwn.us-east-1.elasticbeanstalk.com/wp-admin/post-new.php?post_type=page"
2020/12/04 12:24:49 [error] 13851#0: *69 open() "/var/www/html/public/wp-includes/js/dist/vendor/react-dom.min.js" failed (2: No such file or directory), client: 103.5.133.148, server: , request: "GET /wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0 HTTP/1.1", host: "blog-env.eba-gnu2jhwn.us-east-1.elasticbeanstalk.com", referrer: "http://blog-env.eba-gnu2jhwn.us-east-1.elasticbeanstalk.com/wp-admin/post-new.php?post_type=page"
2020/12/04 12:24:49 [error] 13851#0: *72 open() "/var/www/html/public/wp-includes/js/dist/vendor/moment.min.js" failed (2: No such file or directory), client: 103.5.133.148, server: , request: "GET /wp-includes/js/dist/vendor/moment.min.js?ver=2.22.2 HTTP/1.1", host: "blog-env.eba-gnu2jhwn.us-east-1.elasticbeanstalk.com", referrer: "http://blog-env.eba-gnu2jhwn.us-east-1.elasticbeanstalk.com/wp-admin/post-new.php?post_type=page"
Ответ №1:
Проблема была вызвана git. Я использую composer с WordPress, поэтому добавил запись ‘vendor /’ в файл .gitignore.
Из-за этого ни одна из папок поставщика не отправлялась на сервер и, следовательно, отсутствовали файлы.
Я изменил ‘vendor /’ на ‘/ vendor’ в файле .gitignore. Запустил ‘git rm -r —cached.’ и снова зафиксировал код.
Теперь это работает.