Sometimes you may need to shut down a WordPress site without affecting the data. If you are an aspiring developer, then sometimes you may want to make a site disappear remotely without actually destroying anything. This is where CSS comes in handy. In this article, I will show you how to shut down a website with one line of code.
There are two ways to do this, the first method remotely uploads a small CSS file to your site, which you can trigger from a remote URL. This method is particularly useful 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.
Turn off a web page remotely
The first thing you need to do is visit CSS russian virtual mobile number 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, the CSS kill switch will show you two lines of code. You need to use either one, I would recommend using the @import line. Simply copy and paste it into your WordPress theme's stylesheet.
Implementing CSS kill switch
Now to shut down your website, all you need to do is revisit CSS Kill Switch and log in with your site ID and password. Once you are logged in, simply check the Engage box to shut down the website.
Manually shut down a website
What CSS Kill Switch does, can also be done manually. Simply add this single line of code to your theme's stylesheet:
body * { display: none !important; }
CSS Kill Switch also adds black as a background color. If you are doing this manually and want to trick someone into thinking that there is something wrong with the website, then leaving it white will make people think that they are facing the dreaded WordPress white screen of death error. It will take some time for them to realize that there is nothing wrong with WordPress on your website.
Please note that by turning off the appearance of a website, you are not actually turning off a website. The content of the site will still be visible to search engines and text-only browsers. Any user can still view the content by viewing the page source code. CSS code is also easily discoverable by clicking Inspect Element anywhere on a web page.
I hope this article helped you learn how to disable a website with just one line of code.
If you enjoyed this article, please join ThemeLab on Twitter and Google+ .