# Enable WordPress Error Logging

> Quick copy and paste to enable error logging in WordPress. Put the below in wp-config.php define('WP_DEBUG', true); if (WP_DEBUG) { @error_reporting(E_ALL); @ini_set('log_errors', true); @ini_set('log_errors_max_len', '0'); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false); define('CONCATENATE_SCRIPTS', false); define('SAVEQUERIES', true); }
> URL: https://www.tring-web-design.co.uk/2025/01/enable-wordpress-error-logging/
> Last modified: 2026-09-12T16:35:45+00:00

Quick copy and paste to enable error logging in WordPress.

Put the below in wp-config.php

```
define('WP_DEBUG', true);
if (WP_DEBUG) {
       @error_reporting(E_ALL);
       @ini_set('log_errors', true);
       @ini_set('log_errors_max_len', '0');
       define('WP_DEBUG_LOG', true);
       define('WP_DEBUG_DISPLAY', false);
       define('CONCATENATE_SCRIPTS', false);
       define('SAVEQUERIES', true);
}
```
