WordPress.org

Ready to get started?Download WordPress

Forums

Upgrade: 2.5 -> 2.7, Avoiding Gotchas (8 posts)

  1. HalNineThousand
    Member
    Posted 5 years ago #

    My blog is hosted by Westhost and it's been made clear to me that I have to upgrade my install of WordPress. They have a customized install of WordPress, basically set up to go in the directories they specify. I've also copied it to another directory so I can use it in a domain other than my main one and created the appropriate new tables in the database.

    For some reason, when I try to upgrade from 2.5.1 to 2.7, it won't work on this account. I figure (and the tech on the phone figures) it could be because of the extra tables I've created in the database for the 2nd domain (the error is that it can't back up the database tables).

    I figure the fastest way to handle this would be to uninstall 2.5.1 and install 2.7. The thing is I have a vague memory of doing something similar in the past and getting burned because there was a change in the DB table structure between versions.

    Are there any "gotchas" like that between 2.5.1 and 2.7? My plan is to copy over the WordPress database directory to a backup location, uninstall 2.5.1, then install 2.7, then copy the database directory back to where it was originally. If 2.7 uses the same table and table formats as 2.5.1, that should work without problem. OR if there is a way to log into WordPress once I've upgraded the files and have it upgrade any tables it has to alter, that would likely work as well.

    I'd just like to know what I'm getting into before I try this. Should it work, or is this a dangerous thing to do?

    Thanks for any help or info on this!

  2. HalNineThousand
    Member
    Posted 5 years ago #

    Okay, is it that nobody here really knows this, or is there a better place for me to ask for help on this?

  3. whooami
    Member
    Posted 5 years ago #

    Are there any "gotchas" like that between 2.5.1 and 2.7? My plan is to copy over the WordPress database directory to a backup location, uninstall 2.5.1, then install 2.7, then copy the database directory back to where it was originally. If 2.7 uses the same table and table formats as 2.5.1, that should work without problem. OR if there is a way to log into WordPress once I've upgraded the files and have it upgrade any tables it has to alter, that would likely work as well.

    you sound like an exceptionally bright person, so here's my advice:

    the schemas are layed out in the same file.

    go grab 2.51 here:

    http://wordpress.org/download/release-archive/

    go grab 2.7 or 2.7.1, (it makes no difference)

    and compare the 2 version's wp-admin/includes/schema.php

    you can always set up the 2.7.1 blog in another area of the site and import the posts off the other blog, then kill the old blog, and move the new blog. you dont necessarily have to perform mysql surgery.

  4. HalNineThousand
    Member
    Posted 5 years ago #

    Actually, yes, I was considering setting up the new blog in a different place to check and see how it worked. The problem is I have to use the packages from my hosting provider for this.

    I didn't know, in order to deal with wordpress, I was going to have to understand MySQL tables, but I guess that's what I get for going with a hosting company that uses open source packages.

    I tried the upgrade by doing as suggested -- using a different location. The problem is now version 2.5, the one that worked, is no longer available on the control panel for the hosting company. I can copy files back, but then I'm using a program my hosting company considers unsupported.

    So I guess several years of blogging is now screwed over.

    If there's some way to bring in all the DB stuff from 2.5.1 into the 2.7 blog, I'd appreciate it if someone who knows what I can do could help me on this!

  5. HalNineThousand
    Member
    Posted 5 years ago #

    Yep, even though I know my hosting company won't like it, I put WP 2.5.1 back in place, including the database files and directory, check that it's all as it should be -- and my blog is gone.

    So if anyone can help me rescue my blog -- someone that doesn't expect me to read schemas that not everyone has the training to understand, I'd deeply appreciate it.

  6. whooami
    Member
    Posted 5 years ago #

    I wasnt expecting you to read schemas, just compare the 2 differences between the 2 files. I'm not sure Im willing to apologize for overestimating your ability.

    If you dont understand something, its on you to come back and say so before proceeding.

    If there's some way to bring in all the DB stuff from 2.5.1 into the 2.7 blog

    do you have a backup of the 2.5.1 database?

    If so, contact me off list, and Ill take care of this for you.

    im whoo @nd my domain is village-idiot.org

  7. HalNineThousand
    Member
    Posted 5 years ago #

    I'm taking another tactic -- I had the techs at the hosting company restore backups for the past 5 days (each to a different directory, wp-1, wp-2, etc. and mysql-1, etc.). The tech there that's on tonight said it's a slow night and it's just a matter of a few copy commands and that WordPress will do the db updating automatically. It's 3 am, I need serious rest (after an accident earlier this month -- can't turn my head much, meds make it hard to think and sleep, etc), so I'm going to let him finish it up.

  8. HalNineThousand
    Member
    Posted 5 years ago #

    Okay, according to the tech I talked to (and who, luckily, had a slow night and needed to kill time), here's what he said would have worked from the start:

    1) Backup the WordPress directory
    2) Backup the WordPress database directory
    3) Uninstall WordPress 2.5.1 from my account
    4) Install WordPress 2.7 to my account
    5) Copy the files in the old WordPress database directory into the new one, replacing ALL files in there (or wiping the directory first)
    6) Go directly to http://mydomain.com/wordpress/wp-login.php
    7) Log in
    8) WordPress sees the database is not up to date and says it will update it -- database is updated
    9) Copy the wp-content and wordpress directories INSIDE the wordpress backup directory on the web site to the new wordpress directory on the site so all the images and media are left intact
    10) RESTART MySQL. On my account, that was "/etc/init.d/mysql restart" but could vary on different setups.

    And, according to him, that's what it took.

    So database schema, my skills, and so on, really had nothing to do with it. Since DB files had to be updated, if I had read and understood schema, I would have seen they were different and not known what to do.

    One point, and I don't know if this is a WordPress issue, is that on my earlier attempts to upgrade, the first thing I did was go to the main WordPress page on my website and I got the new install one post entry saying something like, "This is your WordPress blog." I don't know if the problem was going there before logging in or if it was that I did not restart MySQL first.

    So, overall, the answer is not in comparing one schema with another. It's in what is backed up and restored because WordPress does the conversion automatically. If someone could have told me it would automatically update those tables, that would have been the quick and easy answer here.

Topic Closed

This topic has been closed to new replies.

About this Topic