WordPress.org

Ready to get started?Download WordPress

Forums

Blocking access during upgrade (16 posts)

  1. meatbrain
    Member
    Posted 8 years ago #

    I'm fairly confident that I can complete the upgrade to 2.0 without disaster. I am wondering how others have blocked access to their site during an upgrade (to prevent addition of comments while the database is being upgraded, for instance), or if this is even necessary.

    Any suggestions?

  2. ladydelaluna
    Member
    Posted 8 years ago #

    The only way I've seen is to use a copy of index.php, save it as home.php and remove everything between the content divs, and replace it with something like "Our site is down for maintenance, please check back later"

    You'll need to know a little about "The Loop" to make sure you don't remove too much, or that you remove enough... but it should work for you without a problem. When you're done, you can delete the file.

    THAT SAID - I've never felt the need to take the site down during an upgrade. It happens so fast, and everything like comments and posts are stored in the database (which doesn't get touched during an upgrade).

  3. meatbrain
    Member
    Posted 8 years ago #

    Thanks for the response. Lady D. I've done a upgrade already on a test copy of my blog on a server I have at home, and the last step is to run upgrade.php. I thought that was doing a database upgrade. Is that belief incorrect?

  4. moshu
    Member
    Posted 8 years ago #

    Is that belief incorrect?

    No, it is correct. However it happens in seconds, so I don't see a reason for all this worry :)

  5. drmike
    Member
    Posted 8 years ago #

    Even the file install took less than 30 seconds. :)

  6. manstraw
    Member
    Posted 8 years ago #

    The way I upgrade is as follows:

    The following assumes the blog is at location other than /wordpress, which I always do, just so I can do this upgrade method. And I use the shell in linux.

    Then I poke the upgrade process, in 2.0.3, that's logging in and clicking the upgrade link.

    In English, the above means: change the name of the dir from blog to wordpress, which hides the blog from visitors, but it's not for long; get the update; unpack it right on top of the old files; set proper owner and group, and do all subfolders etc.; change the name back to blog (or whatever).

    Since it's hidden from users, I don't need to worry much about them posting comments while I'm replacing files. And then I immediately do the upgrade after changing the dir back to the normal one. It's never been a problem for me, and I've done this at least 40 times, between various blogs and versions.

    I never modify wordpress core files, which lets me just write on top of the old files without worry.

  7. moshu
    Member
    Posted 8 years ago #

    @manstraw,
    That's a nice method, except... the average WP user is happy if can handle a FTP client from his/her Win machine.
    Those who know the shell commands - I bet they are able to upgrade without any further instructions.
    For those who are asking here - what you wrote is totally g(r)eek :) For them "shell" is the gas station on the corner!

  8. manstraw
    Member
    Posted 8 years ago #

    good point moshu. I wrote thinking there were inbetween types out there.

    The main point I wanted to make was that you could rename the directory, making your changes, and change it back. Should be able to that from most ftp clients. But even still, if you're quick about it, I don't really see it being a problem. wordpress doesn't lollygag!

    and btw, ftp should be banned from earth ;) but that's a whole other thread, and well, other forum too.

  9. meatbrain
    Member
    Posted 8 years ago #

    manstraw: Thank you for your contribution. I can try this on my test server, to be certain I understand then process, before doing my live blog.

    moshu: Not everyone who asks questions here asks because they are a newbie. I've understood and used ftp for at least fifteen years. I speak fluent geek (without the 'r'). At the very least, manstraw's method is now posted and available for anyone who wants to use it.

  10. Matt Mullenweg
    Troublemaker
    Posted 8 years ago #

    You could try this in your .htaccess file.

    Deny From All
    Allow From 123.123.123.123

    When 123... is your IP address.

  11. manstraw
    Member
    Posted 8 years ago #

    matt, that would block everyone, except him.

  12. ladydelaluna
    Member
    Posted 8 years ago #

    manstraw - if you read the original post, that's what he was trying to do during his upgrade... remember? so what matt said would work... obviously he'd have to change it back.

    (let's not forget who matt is, okay?) ;)

  13. manstraw
    Member
    Posted 8 years ago #

    heh, yeah, i forgot the original point. my bad.

    as far as who Matt is, well, I don't pay much attention to who anyone is. and generally expect the same in return!

  14. AjAx
    Member
    Posted 8 years ago #

  15. ladydelaluna
    Member
    Posted 8 years ago #

    Thanks for the plugin link, AjAx - didn't even know about that one. :)

    manstraw - matt is one of the original creators of wordpress... I'd think one would want to know something like who they're getting their software from at least! ;)

  16. manstraw
    Member
    Posted 8 years ago #

    I guess I'm too egalitarian for some. ;)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags