Advertisement
daymobrew

WordPress - enable debugging per IP

Feb 17th, 2016
775
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. <?php
  2. // Enable debugging only for my IP.
  3. if ($_SERVER['REMOTE_ADDR'] == '123.426.789.111') {
  4.     define('WP_DEBUG', true);
  5.     define('WP_DEBUG_LOG', true);  // Created /wp-content/debug.log
  6.     define('WP_DEBUG_DISPLAY', false); // Sent errors to log file instead of browser.
  7.     @ini_set('display_errors', 0);
  8. } else {
  9.     define('WP_DEBUG', false);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement