Today i’m sharing one simple trick for special situation – when your website is not ready yet and you don’t want visitors to access your website, but at the same time you want to share your website to some alpha testers or friends. With special plugins may be you can solve this, but the simple code i give below solves this problem perfectly. Just put this code to the 1st line of your theme’s header.php. You can edit html part of code’s echo part and put there any image, message for visitors which tells them your website is coming soon or under construction. Continue reading →


Sometimes you may need temporary switch debug on, to test something, then switch it off. You should go to ftp(or any other file manager) explore root folder, edit wp-config, save it, then test something and then edit again, save again. And plus in this case stranger visitors will also be able to open your website in debug mode. So simple trick is needed to do all these easily and safely. Here is the simple trick to do it. Go to wp-config.php, open it in editor, and replace define(‘WP_DEBUG’, false); with

if (!empty($_GET["some_secret_parameter"])) define('WP_DEBUG', true); else define('WP_DEBUG', false);

Type your own secret parameter instead of “some_secret_parameter”. Then your website will work in debug=false mode. But you will always be able to open your website in debug=true mode with opening your website with such url: yourwebsite.com/?some_secret_parameter=1 This way is better right? 🙂 And safe, as nobody knows this secret_parameter but you.