skip to Main Content

I am trying to activate the WordPress Debug mode but the error.log file is not created. I added this code to the wp-config.php file.

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

2

Answers


  1. I think I found the problem (Apache server). In the Apache server, inside the php.ini, the variable:

    track_errors = Off
    

    To get this information, you can do in a phpfile phpinfo();. So, to write the debug log file, you need to set track_errors as ‘On’.

    Login or Signup to reply.
  2. If you are using cPanel for your server (which I’m assuming since you included the tag cpanel in your post), and the PHP-FPM is active, the wordpress error log goes to your site error log file, and won’t appear in wp-content which is the wordpress default error log location.

    Your site error log is located in

    /yourAccountName/logs/yourdomain_com.php.error.log

    Before ‘your account name’ you might see /home/ or /homexxx/ where xxx is some number.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search