In: , , ,
On: 2005 / 11 / 18 Viewed: 51258 times
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. 1
    Weblog Tools Collection » Wordpres... Germany »
    pingback on 19/Nov/05 at 9:30 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   [...]

  2. 2
    sarangayo Korea (South) »
    commented, on 23/Nov/05 at 1:54 am # :

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

  3. 3
    Taylor Thompson United States »
    said, on 12/Sep/08 at 1:40 am # :

    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

Comment Guidelines or Die

  • HTML: You can use these tags: <a href=""> <em> <i> <b> <strong> <blockquote>
  • Posting code: Post raw code (no <> &lt; etc) within appropriate tags : [php][/php], [css][/css], [html][/html], [js][/js], [sql][/sql], [xml][/xml], or generic [code][code]
  • Gravatars: Curious about the little images next to each commenter's name ? Go to Gravatar.
  • Spam: Various spam plugins on patrol. I'll put pins in a Voodoo doll if you spam me.
  • I will mark as Spam test comments, all comments with SEO names (ie "My Cool Online Shop" instead of "Joe") or containing forum-like signatures.

Read more ?