Wordpress Maintenace Notice
When you work on your wordpress blog, for example modify the theme or back-up your database, would you prefer to suspend the blog while you perform the task? Or do you prefer to act careless and let others see that uncompleted job of yours?
I’d prefer to suspend the blog. Why? Because it’s a nuisance for me, when I’m backing-up my database, somebody posted a comment, which will absolutely be left out from my database back-up. So I think giving a notice to visitors that the blog is under maintenance, and really suspend the blog from outer-side interaction, is a good step.
These following steps will suspend the wordpress blog, by showing a notice on every requested permalink. Its so simple, no plugins required. And it is much better instead of only putting a single emptied index.php file in your blog folder (because when people access the permalink, the content will still be available).
- Access you wordpress root folder (either your domain root folder, or the folder where the blog is being installed). If you can find
wp-config.phpandwp-settings.phpon that path, then you are at the right place. - Create a .maintenance file (note that it’s a dot file, just like .htaccess) – yes it’s a hidden-file. And this is what you type inside of it:
<?php $upgrading = time(); ?>
This will let your wordpress to display the notice until the current time is less than 10 minutes from the specified by the $upgrading variable. And since the variable is set with the current time itself, then the display will shows as long as the .maintenance file exists.
It’s just that simple, and wordpress will show its default maintenance notice for every page that is requested.
Related posts:
- Full Size Image in Wordpress Default Gallery Wordpress Gallery is indeed a handy tools to neatly...
- How to Install Wordpress Plugins Wordpress is a free CMS engine, that empowered this...
Related posts brought to you by Yet Another Related Posts Plugin.



