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 个月前242 查看次数
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.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则