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
gefragt vor 8 Monaten242 Aufrufe
1 Antwort
1
Akzeptierte Antwort

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
EXPERTE
beantwortet vor 8 Monaten
  • 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.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen