Get the Official WPSaviour App Now!

Blog

How to Switch Off a Website With One Line of Code

How to Switch Off a Website With One Line of Code

Sometimes you may need to switch off a WordPress site without affecting data. If you are an aspiring developer, then sometimes you may want to remotely make a site disappear without actually destroying anything. This is where CSS comes in handy. In this article, I will show you how to switch off a website with one line of code.

There are two ways to do this, first method remotely loads a tiny CSS file into your site, which you can turn on from a remote URL. This method is particularly helpful for theme developers who are looking for a way to deal with non-paying clients.

The second method is to add the CSS yourself. This method is useful, when you just want to hide the style and appearance of a website.

Remotely Switching Off a Website

First thing you need to do is to visit CSS Kill Switch and create an account for your website by providing a site ID and password.

Add your site to CSS Kill Switch

Once you have added your site, CSS kill switch will show you two lines of code. You need to use either one of them, I would recommend using the @import line. Simply copy and paste it in your WordPress theme’s stylesheet.

Implementing CSS kill switch

Now to turn off your website, all you need to do is revisit CSS Kill Switch and sign in with your site’s ID and Password. Once you are logged in, simply check the Engage box to turn off the website.

Manually Switching Off a Website

What CSS Kill Switch does, can be done manually as well. Simply add this single line of code in your theme’s stylesheet:

1
body * { display: none !important; }

CSS Kill Switch also adds black as background color. If you are doing this manually and want to deceive someone into believing that there is something wrong with the website, then leaving it white will make people think they are facing the dreadful WordPress white screen of death error. It will take them sometime to figure out that there is nothing wrong with WordPress on their website.

Related posts
BlogTutorials

5 HELPFUL WORDPRESS TIPS FOR SAVIOUR Copy

Beginner’s GuideBlog

12 Best WordPress SEO Tips & Techniques to Boost Rankings

Blog

What Makes a “SEO-Friendly” WordPress Theme

BlogTutorials

How To Create A Free Blog On The BlogSpot Blogging Platform

Sign up for our Newsletter and
stay informed

Leave a Reply

Your email address will not be published. Required fields are marked *