Friday, 30 May 2014

How to enable errors tracking and more in WordPress config - Abilitazione errori in wp-config.php

In //wordpress/wp-config.php modify from false to true the following statement:

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

Plus, add these lines of code:

/** Error reporting */
error_reporting(E_ALL);
ini_set('display_errors', 1);

With these, WordPress will show all PHP notices, warnings and fatal errors on video. This is useful in case you don't have access to your error.log on your hosting server.

After finding the error you're searching for, don't forget to change back to false.


Another useful change you might set in wp-config, in order to avoid further errors specially if there's a big sized database, could be to increase the memory size. The default value is 64M. Here's the line of code to change:

/** Memory Limit: now set to 256 MB */
define('WP_MEMORY_LIMIT', '256M');

Post a Comment