bdunagan
fill the void

Posted
27 August 2010 @ 11pm

Tagged
development

No Comments Yet

WordPress Tip: Debug Logging

Today, I needed a debug log for WordPress. Luckily, the WordPress Codex details just a couple lines of code to turn on error logging. This method is especially nice for hosted environments like DreamHost, where there’s no access to php.ini. Simply add the following to wp-config.php:

# http://codex.wordpress.org/Editing_wp-config.php#Debug
define('WP_DEBUG', true);
# http://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Log
@ini_set('log_errors','On');
@ini_set('display_errors','Off');
@ini_set('error_log',dirname(__FILE__).'/logs/php_error.log');

No Comments Yet

Leave a Comment