Snippets

Visser Labs Turn on error file logging in WordPress

Updated by Michael Visser

File functions.php Modified

  • Ignore whitespace
  • Hide word diff
-<?php
 @ini_set( 'log_errors', 'On' );
 @ini_set( 'display_errors', 'Off' );
 define( 'WP_DEBUG', true );
 define( 'WP_DEBUG_LOG', true );
 define( 'WP_DEBUG_DISPLAY', false );
 
-/* That's all, stop editing! Happy blogging. */
-?>
+/* That's all, stop editing! Happy blogging. */
Created by Michael Visser

File functions.php Added

  • Ignore whitespace
  • Hide word diff
+<?php
+@ini_set( 'log_errors', 'On' );
+@ini_set( 'display_errors', 'Off' );
+define( 'WP_DEBUG', true );
+define( 'WP_DEBUG_LOG', true );
+define( 'WP_DEBUG_DISPLAY', false );
+
+/* That's all, stop editing! Happy blogging. */
+?>
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.