The MU forums have moved to WordPress.org

Upgrade 1.2.5a to 1.3.3 almost but only 1 set of wp_*_term* tables (8 posts)

  1. webmaestro
    Member
    Posted 16 years ago #

    I have troubles upgrading from 1.2.5a to 1.3.3. I've followed the instructions on the Upgrading WPMU page (although I didn't overwrite my files, opting instead to start with brand spanking new wpmu-1.3.3 directory & copied over .htaccess & wp-config.php--I plan to bring the plugins over after the DB upgrade is completed).

    My issue is similar to Aydos post:

    I checked the database: wp_1_terms was exist, but wp_2_terms was not.

    The following tables are created:

    • wp_1_terms
    • wp_1_term_relationships
    • wp_1_term_taxonomy

    I've got 350+ blogs and those are the only tables which have the string 'term' in them. FWIW, db_version for all of them is 5200

    I haven't tried the Beta taxonomy sync script. According to donncha, it should not be necessary after the release:

    If all that sounds like too much work, you could wait until the new release in the next week and upgrade your blogs through the normal wpmu-upgrade-site process and when your bloggers visit their backend the upgrade script will be called too in the background. Unfortunately on large and busy sites this is likely to cause load problems as many tables are created at the same time.

  2. webmaestro
    Member
    Posted 16 years ago #

    It looks like the CREATE TABLE $wpdb->terms... and other terms table creation logic is being skipped for all but blog_id=1. As a result, the following code is never called for any of the other blogs:

    foreach ($categories as $category) {
      $term_id = (int) $category->cat_ID;
      $name = $wpdb->escape($category->cat_name);
      $description = $wpdb->escape($category->category_description);
      $slug = $wpdb->escape($category->category_nicename);
      $parent = $wpdb->escape($category->category_parent);
      $term_group = 0;

    There is a potential SQL script that could be tweaked in peripatetic's post, although we would want each blog's categories to be migrated to the 'term' table structure, rather than copying them all from another blog's 'term' tables.

  3. selad
    Member
    Posted 16 years ago #

    Did you run the upgrade script for all blogs or logged in to the backend of blog number 2?

    Yo can try: http://blog2.domain.com/wp-admin/upgrade.php?step=1
    Does that works?

  4. webmaestro
    Member
    Posted 16 years ago #

    Actually, I'm attempting to run through the upgrade process on a couple of test servers (one local) before I put it into production.

    I had an epiphany last night and now suspect the reason it wasn't working correctly, is due to DNS reasons (it's doing an internal fopen or Snoopy URL get on $wpdb->siteurl).

    I was able to get the upgrade script to continue if I placed additional DNS entries for a few additional subdomains, and access them from a web browser using the http://{$siteurl}/wp-admin/upgrade.php?step=1.

    This brings to mind a couple of suggestiong for changes for WPMU upgrade-related scripts (at least of my reasoning is sound!):

    1. Name the scripts with the version number, (older versions won't have the script and will fail with a 404)
    2. Instead of using $siteurl, pass each blog's $blog_id as a parameter
  5. webmaestro
    Member
    Posted 16 years ago #

    I believe I was able to workaround this issue by creating a ton of entries in my /etc/hosts file (one for each blog), and manually loading {siteurl}/wp-admin/upgrade.php?step=1. Phew!

    BTW, I thought of another useful idea for upcoming version(s) of WPMU:

    1. Insert IP address ($_SERVER['SERVER_ADDR']) into the Admin Header or Footer, so we can see the IP address--especially useful when serving from a cluster, or when upgrading/troubleshooting on a different server or set of servers
    2. I, for one, miss wpmu-1.2.5a's version in the footer, so that'd be Nice To Have(tm) as well... ;-)

    Thanks for listening!

    The Web Maestro

  6. webmaestro
    Member
    Posted 16 years ago #

    Never solved this, discovered another issue. widget_text & sidebar_widgets in wp_8_options had issues (widget_text missing most content & sidebar_widgets converted a:10 to 9:10 on import). I hope its fixed in wpmu-1.5rc1.

  7. webmaestro
    Member
    Posted 16 years ago #

    It looks like the widget_text & sidebars_widgets data issue is related to the upgrade process. BTW, one thing I noticed in my testing, is that the database upgrade occurs as soon as I load any /wp-admin/ page. Contrary to my previous assumption, I don't need to go to /wp-admin/upgrade.php?step=1 for the db_blog_version value to be upgraded to 6124.

    Unfortunately, I still am unable to upgrade all databases. I must load each blog URL individually. I'm glad I 'only' have 350 blogs...

  8. webmaestro
    Member
    Posted 16 years ago #

    I should continue by saying that the widget_text & sidebars_widget values appear to be truncated (5 fields instead of 12) for some reason...

About this Topic

  • Started 16 years ago by webmaestro
  • Latest reply from webmaestro