Debug.log Not Generating in WordPress on Elastic Beanstalk

0

I am encountering an issue where the debug.log file is not generating in my WordPress installation on an Elastic Beanstalk environment. Despite enabling WordPress debug mode and setting the necessary configurations in wp-config.php, the debug.log is not generating in wp-content folder. Here are the steps I have taken thus far:

Added the following lines to wp-config.php: define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false ); @ini_set( 'display_errors', 0 );

I've also check the file permissions of wp-content which is "drwxr-xr-x" and it appears okay. I checked as well the log_errors in php.init and it's "On". Any idea how to resolve this? Thank you in advance.

profile picture
Vin
質問済み 8ヶ月前244ビュー
1回答
1
承認された回答

Hello.

It is possible that the php-fpm settings are outputting to "/var/log/php-fpm/www-error.log".
Please check this log file.

profile picture
エキスパート
回答済み 8ヶ月前
  • You mean the content of www-error.log in the path "/var/log/php-fpm/www-error.log" is the same as the content of debug.log?

  • I think it depends on the settings of php-fpm, but if you haven't changed anything, it will probably be output to "/var/log/php-fpm/www-error.log". I think it would be a good idea to actually look at the contents of the log.

  • Thank you for the insight Riku! I'm trying to find out the root cause of the issue because if this is no longer related to elastic beanstalk, I would be resolving this post.

  • You're correct it depends on the www.conf of the php-fpm. The debug.log is now appearing in my wp-content when I commented out the "php_admin_value[error_log] = /var/log/php-fpm/www-error.log" and "php_admin_flag[log_errors] = on". The file www.conf is being managed by elastic beanstalk. I found the solution in this link: https://wordpress.org/support/topic/wp_debug_log-never-gets-created-permissions-correct-php-8-apache-2-4-51/. Thank you much again for guiding me all the way.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ