In: , , ,
On: 2005 / 11 / 18
Shorter URL for this post: http://ozh.in/9t

WordPress tip of the day : how to momentarily turn your WordPress blog down, while working on some heavy maintaining task ?

There are a few plugins around that, once activated, redirect every request to a page telling readers that your blog is currently under some maintenance, reconstruction, attack or anythnig. There is a much much smarter and simple way to do this :

Create a one page theme, index.php only, with your announcement. This file could look like :

  1. <html>
  2. <head>
  3. <title>What the ... ?</title>
  4. </head>
  5. <body>
  6. <center><p>Currently upgrading... Check back later !</p></center>
  7. </body>
  8. </html>

You also need a simple style.css so that WordPress will actually identify your file as a theme, and allow you to select it in the admin menu :

  1. /*  
  2. Theme Name: Shutdown
  3. Theme URI: http://127.0.0.1/
  4. Description: Momentarily shut your blog down
  5. Version: 1
  6. Author: You
  7. Author URI: http://localhost/
  8. */

And you're done. If you select this theme, all of your pages will be available (no "page not found" or anything)and all show the same message.

Of course, for longer shutdowns, you could improve the page a bit : add an appropriate header code (307 Temporary Redirect maybe ?) and a few relevant meta tags so that search engine bots would not completely clear your page out of their database.

I think this method is better than using a plugin since, with such a theme, server and database loads are lowered down to the strict minimum. This could even help you upgrade stuff faster.

I've found this neat trick on WordPress-FR and it's clearly smart stuff.

Shorter URL

Want to share or tweet this post? Please use this short URL: http://ozh.in/9t

Metastuff

This entry "WordPress Tip for Blog Maintenance" was posted on 18/11/2005 at 7:19 pm and is tagged with , , ,
Watch this discussion : Comments RSS 2.0.

3 Blablas

  1. […] 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   […]

  2. sarangayo says:

    Thanks for the info on turning down the blog – its much easier this way. is this from wordpress, or a workaround ?

  3. This is some great information for WordPress Users. I work on Blogger and it's quite frustrating for me, when someone comes to my site to see everything all messed up. I wish that I could find some way to do what you do with WordPress.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Gravatars: Curious about the little images next to each commenter's name ? Go to Gravatar and sign for a free account
Spam: Various spam plugins may be activated. I'll put pins in a Voodoo doll if you spam me.

Read more ?