Skip to content

Instantly share code, notes, and snippets.

@dalethedeveloper
Forked from anonymous/gist:5041678
Last active December 14, 2015 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dalethedeveloper/5041690 to your computer and use it in GitHub Desktop.
Save dalethedeveloper/5041690 to your computer and use it in GitHub Desktop.
Enable debugging on a WordPress site for your session only. Uses a simple URL Variable thats only security is obscurity. Replaces existing WP_DEBUG definition in your wp-config.php
// Replace existing definition in your wp-config.php
// define('WP_DEBUG',false);
if( !isset($_COOKIE['likeaboss']) and isset($_GET['likeaboss']) )
setcookie('likeaboss',($_GET['likeaboss']=='fosho'?'fosho':false), time()+3600);
define('WP_DEBUG',((isset($_COOKIE['likeaboss']) and $_COOKIE['likeaboss']=='fosho')?true:false));
// Drop ?likeaboss=fosho on your URL to enable WP_DEBUG for a bit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment