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
posta 8 mesi fa240 visualizzazioni
1 Risposta
1
Risposta accettata

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
ESPERTO
con risposta 8 mesi fa
  • 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.

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande