debug.log not created in WordPress

Is your debug.log file not generating in WordPress? To create this, all you may need is to allow this in your wp-config.php file.

Allowing the creation of debug.log

To allow the creation of debug.log, follow the steps below:

  1. Open an FTP connection to your server’s WordPress files.
  2. In the root of your WordPress directory, find and edit wp-config.php.
  3. Add in the code below, save and re-upload accordingly.
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

The @ini_set will try to ensure that there are no errors displaying in your control panel.