WordPress Plugin to Make your Blog Temporarily Unavailable for Maintenance
Overview
This Plugin allows you to make your blog temporarily unavailable to your users (with custom message). It is still accessible by the administrators.
It does one thing and does it well. It belongs to the class of zero-configuration plugins. In other words even your grandmother can use it.
Download
Download and follow the instructions in the next section for installation.
Installation
http://codex.wordpress.org/Managing_plugins#Installing_a_plugin
Note: This Plugin supports one-click-install through WordPress Plugin Manager and is also available from WordPress Plugin DB.
- Upload unavailable.php to your wp-content/plugins directory. At this point you are done unless you want to make your site unavailable now. Then read on.
- Log in to WordPress.
- Click Plugins from the main menu.
- Scroll to find the name of the plugin - Site Unavailable, and click Activate whenever you want to make your site unavailable.
Configuration and Usage
Install and activate the plugin as described above. You are done!
Now your site is unavailable to all of your users, till the time you decide to deactivate the plugin.
To reiterate the site will remain unavailable to all your users while this plugin is activated.
The Feeds and Trackback requests will be sent HTTP Code 503 indicating that the Server is Unavailable and they will be asked to retry after an hour (configurable).
Administrators can access the administrative section even while this plugin is activated.
Advanced
You do not need to read this section. The plugin will work fine without any changes at all. However if you are compulsive and feel the urge to tinker then read on.
To change the default message ( This blog is currently undergoing scheduled maintenance. Please try after 60 minutes. Sorry for the inconvenience. ) use the plugin editor to edit the plugin. Change the line where $message is specified to a message of your choice.
You can change the Retry-After hint given to Feed and Trackback requests by changing $retry_after. The value is in minutes. The default is 60 minutes. It also tells the users of the site when to retry again.
This is very useful when you do a scheduled maintenance and you want your users to come back after a fixed time.
Remember this is a hint. It has no bearing with when you make your site actually available ( by deactivating the plugin ).
Deactivate the plugin from the Plugin screen to make the site available again to the world.
Uninstallation
- Log in to WordPress.
- Click Plugins from the main menu.
- Scroll to find the name of the plugin - Site Unavailable, and click Deactivate. This disables the plugin and makes the site available again to all.
You can also delete the unavailable.php file from wp-content/plugins directory for permanent removal.
Cost
This plugin is free. However a linkback will be deeply appreciated. Think of it as a LinkWare.
Comments, feedbacks and suggestions are welcome.
Filed under CMS Software, Headline News, How To, Pro Blogging, Web, WordPress |
84 Comments |
Email this Article























June 17th, 2005 at 3:31 am
Awesome plugin, thank you. ^^
June 17th, 2005 at 8:16 am
Nice plugin, thanks!
Just wondering if there was anyway to modify it so that the logged in admin (user level 10) would still see the site as normal, but any lower level users/not logged-in users would see the “down for maintenance” message?
Thanks!
June 17th, 2005 at 9:13 am
@Carsten
I too was thinking about it. One problem I noticed was that certain data structures are not properly initialized when the plugins are included.
I will soon release the next version with this feature. Keep an eye on this post.
June 17th, 2005 at 8:06 pm
great! I want this for a long time!
June 23rd, 2005 at 7:52 pm
It would be nice to include the header and footer to keep the exsisting look and feel. It was very simple to get this working.
$message = ”;
//$message .= ”;
$message .= ‘This blog is currently undergoing scheduled maintenance. Please try after ‘.$retry_after.’ minutes. Sorry for the inconvenience.’;
…..
if(!strstr($_SERVER['PHP_SELF'], ‘feed/’) && !strstr($_SERVER['PHP_SELF'], ‘wp-admin/’)) {
@ get_header();
echo $message.’Plugin provided by Taragana‘;
@ get_footer();
exit();
}
The @ was to supress some error message.
June 23rd, 2005 at 7:55 pm
that didn’t work properly.
It would be nice to include the header and footer to keep the exsisting look and feel. It was very simple to get this working.
// Message to display to the users of the blog
$message = '';
//$message .= '';
$message .= 'This blog is currently undergoing scheduled maintenance. Please try after '.$retry_after.' minutes. Sorry for the inconvenience.';
// DO NOT MODIFY BELOW THIS LINE
if(!strstr($_SERVER['PHP_SELF'], ‘feed/’) && !strstr($_SERVER['PHP_SELF'], ‘wp-admin/’)) {
@ get_header();
echo $message.’Plugin provided by Taragana‘;
@ get_footer();
exit();
}
The @ was to supress some error message. I only tested this with the default theme.
June 23rd, 2005 at 7:56 pm
i guess even with code tag I cant properly post it.
June 23rd, 2005 at 8:35 pm
@Lou Thanks for the suggestion. You can email me the code at angsuman AT taragana DOT com.
I will create a new version in a day or two with this and another change as suggested in the comments above.
June 24th, 2005 at 11:37 am
I emailed you the link to the code and comments that can be found in a post at http://www.kosherjava.com
July 1st, 2005 at 3:28 pm
[...] Site Updates I just updated the site to 1.5.1.3. There was some kind of security flaw or so. So, I’m glad I got that done. In doing that, I got interested into looking for plugins for WordPress and now I installed one. It’s just to help me mangage the site when I do updates. You can read more about it here. [...]
July 11th, 2005 at 7:03 am
[...] Simple Thoughts, WordPress Italy, Blogging Pro. FeedBurner Resyindication Stats: WordPress  WordPress+Plugins  Unavailable  Unavailable+Plugin Web+Tools   No Comments so far Leave a comment Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> [...]
July 12th, 2005 at 11:18 am
[...] Plugin Site Unavailable | Página Principal [...]
July 20th, 2005 at 2:35 pm
[...] Sesta , e per ora ultima novità, Blog non disponibile che mi permette di rendere non raggiungibile il Blog quando faccio manutenzione o aggiornamenti , per evitare di segare il database. [...]
August 15th, 2005 at 5:32 am
I activated the plugin to upgrade to 1.5.2 and after the file upgrade ( just changed files) I could no longer login to Admin. The plugin stopped both site and admin access. I had to remove the plugin from the Options table Active Plugins field!
Just to let you know there may be a problem after 1.5.2….
September 23rd, 2005 at 8:20 am
[...] Site Unavailable (the only plugin NOT activated ) [...]
November 7th, 2005 at 3:13 am
Still no new version I see.
Yes I am trying to make it so only admin can view the main site and the admin center too when the plugin is on.
November 7th, 2005 at 4:02 am
@Andy & Will
I will look at it today.
November 11th, 2005 at 1:56 am
Wow, thanks a ton!
November 19th, 2005 at 1:29 pm
[...] If you want to make your Blog temporarily unavailable (scheduled maintenance for example) you have two very simple and efficient ways : a plugin, or a theme. Technorati Tags: blogging plugin tips wordpress wordpress theme [...]
November 20th, 2005 at 8:15 am
[...] I wish I had known about this when I was working on updating my blog’s theme. Ah well—at least I’ll be able to use it for the next big update test (search bar and page). [...]
November 21st, 2005 at 10:17 am
[...] You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your ownsite. [...]
November 22nd, 2005 at 11:58 am
[...] Unavailable for Maintenance Plugin WordPress plugin to make your site appear unavailable (perhaps while you change something). [via weblogtoolscollection] (tags: wordpress) [...]
November 23rd, 2005 at 11:31 am
[...] 1. El plugin Site Unavailable, que te permite mostrar un mensaje personalizado en vez de la página de tu blog. [...]
November 23rd, 2005 at 2:49 pm
[...] [...]
December 7th, 2005 at 1:39 am
Hy, very nice Plugin - i have translate your plugin for german wp-users and i have write a little unavailable site for this plugin.
i hope, you enjoy this.
Link to Plugin: http://www.bueltge.de/wp-waertungsmodus-plugin/101/
With best regards Frank
December 7th, 2005 at 2:22 am
[...] Das Basisscript und die Idee stammen von Angsuman Chakraborty. Das vorhandene plugin habe ich dediglich auf meine Bedürfnisse erweitert und für deutsche WP-User optimiert und dokumentiert. [...]
December 15th, 2005 at 4:19 am
Say, don’t want to sound pushy or anything but umm, when is that next update with inclusions on some of those suggestions coming out?
Thanks for this TEMPORARILY UNAVAILABLE plug-in:
VERY USEFUL
December 30th, 2005 at 9:18 pm
[...] Unavailable可以使你的站点在插件激活后任何人都访问不到,包括RSS FEED。 访问 site unavailable [...]
January 4th, 2006 at 12:29 pm
[...] WordPress Plugin to Make your Blog Temporarily Unavailable for Maintenance [...]
January 11th, 2006 at 1:21 pm
[...] Site Unavailable [...]
February 16th, 2006 at 8:55 pm
Thanks, its a great plugin =)… and works excellent
February 28th, 2006 at 1:38 pm
nice, and usefull plugin.
thanx.
but. i have a problem (same that Andy):
i cannot login. when i go to login screen, the message its same, that the main site.
i hvae only one solution: delete the plugin file :S
March 13th, 2006 at 2:53 am
This is wonderful! Just what I’ve been looking for.
March 19th, 2006 at 4:16 am
[...] Site Unavailable 设置站点维护时的显示信息。 [...]
April 17th, 2006 at 2:29 pm
Excellent plugin but it does not work with Wordpress 2.02 Shame really. Unfortunately, you cannot even access the admin once the plugin is activated. Any chance you#ll be upgrading it?
April 23rd, 2006 at 6:17 am
This plugin worked so long my browser does not log off my admin account. If I do so, I cannot log in again. The site has shut me out too.
It is good for short mantainance sessions though
Thanks for this plugin.
April 28th, 2006 at 12:21 pm
Several people have successfully used this plugin and are using even today.
The problem appears to be specific to your site.
Unfortunately I do not have much time at the moment to debug and support this issue.
April 30th, 2006 at 4:24 am
This plugin is exactly what i’m looking for, very useful. Thanks
May 14th, 2006 at 4:09 pm
ke>
May 15th, 2006 at 4:39 pm
“This plugin worked so long my browser does not log off my admin account. If I do so, I cannot log in again. The site has shut me out too.”
I’m having the same problem. Using a fresh install of WP too. HOW DO WE LOGIN NOW? http://www.asdasf/wp-login.php returns “under maintenance”!
May 16th, 2006 at 3:47 am
You can always delete/rename the plugin file and things will be back to normal.
I will take a look into this.
June 8th, 2006 at 2:38 am
Hi,
Site unavailabel works in my site but, there is no message appear and I can see only white screen.
I can use my admin accout to activate.
Any idea?
June 12th, 2006 at 11:17 pm
Hi
I have a urgent problem. After activating this plugin, and deactivating it, I find that my site returns a blank page only. I can still get back the offline page when I activate this plugin. There is nothing I can do to get the site to work again. Can you please give me instructions on how to clear this? Thanks in advance.
June 13th, 2006 at 12:49 am
Leion,
I cannot see anyway the plugin is causing this as it is inactivated.
In any case delete the plugin file from plugins folder. Also delete your cacahe folder under wp-contents.
Let me know how it goes.
June 13th, 2006 at 6:26 am
It does not work. I am not sure if this has anything to do with the wp-cache plugin..
June 14th, 2006 at 3:40 am
wp-cache 2 is the most likely cause. Check that you do not have gzip compression turned on.
I also faced such problem with Bad behavior plugin.
But never ever can my plugin
cause this behavior.
June 21st, 2006 at 3:53 pm
[...] To keep my blog in a solid state while upgrading, I installed a site-unavailable plugin. Worked OK. [...]
August 13th, 2006 at 10:05 pm
Hmmm… I seem to be having the same problem as #36.. I’m hurt, is there a way that I can temporarily disable the plugin from the outside — by FTP maybe? Thanks…
-Stepn
August 13th, 2006 at 11:47 pm
> is there a way that I can temporarily disable the plugin from the outside — by FTP maybe?
Yes, delete the plugin file using http://FTP.
August 13th, 2006 at 11:47 pm
A new version is coming soon.
August 19th, 2006 at 3:18 am
Angsuman - take a look at the maintenance mode plugin for your next update. Including an admin option page where you can add your own html to generate your own ‘down for the count’ page would be a useful addition
October 4th, 2006 at 5:11 pm
[...] Well they waiting will be over tomorrow. I have about 200 pix to upload, and yeah for dial up users that’s going to suck to load all the pictures, for me it’s going to suck to add them all, but oh well I’ll get ‘em done. Anyway, a quick happy fathers day to all! I’m doing ok, big update tomorrow. Site News Our server is having mysql problems again… Kinda sucks if the thing goes down you get that ugly wordpress error thing, when I’m done with the site you’d get an error if mysql goes down but it will have news that I can update as to wut is happening. Also I’ve added a nice plugin where I can do work on the site and if anyone trys to access anypage it will give them an under construction sign. Check out the plugin for wordpress here. Unavailable [...]
January 3rd, 2007 at 2:57 am
[...] ダウンロード: Site Unavailable - Simple Thoughts [...]
February 14th, 2007 at 9:37 am
pls send me new yahoo masinger
April 10th, 2007 at 5:36 am
but you can simply change (replace) index.php page with your Unavailable text
May 25th, 2007 at 9:21 pm
very cool, thank you!
August 1st, 2007 at 7:52 pm
Hi. Problem:
I find ‘php_self’ occasionally not to work with WP installations with a custom path and custom permalinks. This is a problem with many plugins actually.
I suggest these changes to your code:
use ‘request_uri’ instead of ‘php_self’, and use ’strpos’ instead of ’strstr’.
what do you think?
September 25th, 2007 at 10:50 am
This plugin is great. It works fantastic
October 18th, 2007 at 8:13 am
wow, nice plugin. It makes all wordpress users to next level - profesional.
November 13th, 2007 at 4:13 am
i have some problems with google bots many times when i was working on my blog but with this plugin everything is great! thank you!
December 15th, 2007 at 3:18 am
thanks for this great and very easy to use plugin!!
December 20th, 2007 at 4:49 pm
Thanks, is very simple
January 9th, 2008 at 11:00 am
is great! and this website is great ! thanks again.
January 11th, 2008 at 2:35 pm
very useful plugin , y put this to my blog and work 100% , IS GREAT MAN !
January 17th, 2008 at 11:44 am
Great, just what i was looking for! Thanks mate!
March 6th, 2008 at 4:01 pm
I will forward this to all of my friends.
March 30th, 2008 at 11:48 am
Plugin denies access to google and search engines?
March 30th, 2008 at 2:32 pm
No. It doesn’t deny access to search engines. However they will see the maintenance page like any other user. This plugin should only be activated when you want to take your blog offline / in maintenance mode.
April 21st, 2008 at 9:45 pm
Can I enable PHP in that page? I am planning on using a countdown page (that has Flash and PHP for a mailing list) to launch my website. It will be the only page accessible till I launch my website.
May 30th, 2008 at 12:09 pm
great plugin thank you
August 19th, 2008 at 3:54 am
[...] 通過下拉菜單來簡化tag過程過程,同時可以從你當前的tag插件中進行導入。 Site Unavailable - [...]
August 21st, 2008 at 4:53 pm
[...] Site Unavailable: Este plugin permite que usted haga su blog temporalmente inasequible a sus usuarios (con el mensaje de encargo). Sigue siendo accesible por los administradores. Es una cero-configuracio’n plugin. [...]
August 21st, 2008 at 9:50 pm
[...] во всплывающем окне выводит полное изображение. Site Unavailable - позволяет отобразить для читателей что сайт [...]
September 26th, 2008 at 6:11 pm
This plugin is exactly what i’m looking for, very useful. Thanks
October 9th, 2008 at 5:53 pm
[...] Site Unavailable - When you are upgrading or performing maintenance, why let your readers or visitors see errors? You can instead show a custom message that your site is offline and will be back shortly. [...]
November 1st, 2008 at 6:25 am
[...] Site Unavailable: Este plugin permite que usted haga su blog temporalmente inaccesible a sus usuarios (con el mensaje indicado). Sigue siendo accesible por los administradores. [...]
November 22nd, 2008 at 12:39 am
Can I enable PHP in that page? Puis-je activer PHP dans cette page? I am planning on using a countdown page (that has Flash and PHP for a mailing list) to launch my website. Je suis de planification sur l’utilisation d’une page à rebours (qui a Flash et PHP pour une liste de diffusion) pour lancer mon site. It will be the only page accessible till I launch my website. Elle sera la seule page accessible jusqu’au je lance mon site.
December 11th, 2008 at 7:11 pm
great plugin thank you
January 27th, 2009 at 9:11 pm
[...] Site Unavailable - Publishes a message that your site is down while still allowing admins to login. [...]
February 11th, 2009 at 12:04 am
This plugin is exactly what i’m looking for, very useful. Thanks
March 28th, 2009 at 4:03 am
i want a template with dual sidebar on both left and rights side of my blog. can anyone tell me where can i find one.
March 28th, 2009 at 7:39 am
Search in our blog by ‘template’. I am sure you will find plenty of them.
Thanks
Soumya Sinha
Simple Thoughts
April 30th, 2009 at 12:05 pm
Hi, thank you for this post. Not so long ago I did try this one cause I needed to hide my blog online cause I think its so private but of course there are viewers that I would want to be seen. This is a big help for future use. Thanks again.
May 2nd, 2009 at 11:27 am
how can i develop a site while i’m using this plugin? i can’t get a preview of every pages,but i’m the admin.
illogical