• Resolved Ann Donnelly

    (@anndonnelly)


    I think I have resolved this, but want to check if there’s anything else I need to check to be sure — and thought this post may help others.

    I upgraded a WordPress MU site to 3.0 using the quick install in the Control Panel and following steps in http://developersmind.com/2010/06/17/upgrading-wordpress-mu-2-9-2-to-wordpress-3-0/ (thanks to andrea_r for posting this on another thread).

    I also adding to wp-config.php (not sure if needed):
    define( ‘MULTISITE’, true );

    I got database errors and WP couldn’t repair and I did a few things I stupidly cannot remember and finally got an error showing that there were tables missing. There were a few “wp_” tables missing. To fix I:
    – dropped all the tables in the existing database
    – did the installation again
    – imported my backed up database

    Database fixed, but there was no data in my main site, but there was in the second site. I thought I had read something that with 3.0 it was using wp_ instead of wp_1 so I:
    – renamed some of the wp_ tables to wp_3 (as I was afraid to just drop them in case I needed to go back) — some of the wp_ files did not have equivalent wp_1 and wp_2 files so I left as wp_ thinking they were needed to run the overall application.
    – then renamed the wp_1 tables to wp_

    It worked, but now I am just afraid there may be some other things I ma need to fix. Anyone think of anything else I should check?

    Should I drop the tables I now have as wp_3 to keep the db tidy and in case I do add a 3rd site here.

Viewing 15 replies - 1 through 15 (of 24 total)
  • Thread Starter Ann Donnelly

    (@anndonnelly)

    I have found another issue: It created the admin user again in the install, but an existing user account is not working. I deleted it and tried to add it again and it’s still not working.

    I can add a new user, but with no permissions, so when you login you get: “You don’t have permission to view this site. Please contact the system administrator.”

    Is it an issue with the tables? Something else?

    Thanks, Ann

    Oh man, I’m actually surprised you got it all working. 😀 that was the long way around. 😉

    Login as that admin user it created, then go to the other user’s profile page (Super Admin -> Users, then edit) and check the box to give them Super admin powers.

    Thread Starter Ann Donnelly

    (@anndonnelly)

    Sorry Andrea, forgot to mention I tried that and when I check the box I get error: You can’t give users that role. In the dropdown only ‘No Role for this site’ is available, as well.

    I’d appreciate your advice on how I should have done this whole upgrade because I have 3 more MUs to upgrade to 3.0 so don’t want to make the same mistakes.

    Thanks!

    I’d appreciate your advice on how I should have done this whole upgrade

    like this:
    http://wpmututorials.com/how-to/upgrading-from-wpmu-to-wp-3-0/

    no renaming of tables needed, no defines in config. WP can tell & does check to see if it was an upgraded wpmu install or not.

    So, when you’re logged in as that new admin, do you see the Super Admin menu?

    Thread Starter Ann Donnelly

    (@anndonnelly)

    When I go to Super Admin – Users – edit user – check the box “Grant this user super admin privileges for the Network.” – get error “You can’t give users that role”. (In the dropdown only ‘No Role for this site’ is available, as well.)

    Thanks, again!

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Oh hell, I know that one… I had that one on my site I upgraded kinda like yours (for a lot of reasons, most of which I regret).

    My solution was that while I had created wp_1_userroles, I HAD NOT remembered to copy up wp_1_user_roles

    You need them both. I’m not 100% sure what your tables are now, but if you’re using wp_ as your main blog, then it should be wp_user_roles.

    Thread Starter Ann Donnelly

    (@anndonnelly)

    Thanks ipstenu – there is wp_users and wp_usermeta

    There were no user_roles or userroles tables created in the install and no other tables created in the install that seem to be related to users.

    Do I have to create that those tables for the sites?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    I went back to look and those aren’t there.

    Darn, now I want to know what crack I’m smoking. I’m off to find my notes on my weird upgrade.

    Check in those user tables for the user role *fields* 🙂

    Thread Starter Ann Donnelly

    (@anndonnelly)

    Ah ha! Thanks to Andrea’s hint and some other info at http://wordpress.org/support/topic/414183?replies=3

    Looked at table wp_options and there was a field called wp_1_user_roles. Renamed to wp_user_roles and now all fixed!!!

    So need to look through rest of table for references to “wp_1” (which I should have done after I renamed all those tables).

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    AH! That was it!

    Sheesh. I’m on fine grade crack today.

    Thread Starter Ann Donnelly

    (@anndonnelly)

    Sorry – spoke too soon. I was able to change user roles for the main site – aka wp_ — but not for the second site – aka wp_2.

    I’ve looked through the tables and cannot see a field that may relate to this.

    There’s wp_site, wp_sitecategories and wp_sitemeta — but no equivalent for wp_2 — is this right?

    Looking at one of my MU 2.92 installations and see wp_ files are just for the whole install, wp_1 is for the main site and wp_3 is for the second site. Is this the way this other one should be?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    If you start from scratch and never delete them, in WPMU you get:
    wp_1 is site 1
    wp_2 is site 2, etc etc

    In MultiSite, since you start as Single Site, you get….
    wp_ is site one,
    wp_2 is site two and so on.

    If you really screw things up, you get what I have:
    wp_2 is site 2
    wp_3 is site 1
    wp_6 is site 3
    wp_7 is site 4

    No. Really That’s what mine is. Don’t ask 😉

    Anyway, if I’ve stopped smoking crack…. If you have the same user base on site #2 right now, duplicate wp_1_user_roles and name that wp_2_user_roles and put it in wp_2_options. That will get you started and SHOULD allow you to change things.

    wp_site, wp_sitecategories and wp_sitemeta are all site wide and never get a prefix.

    Yeah, now even I am confused and it’s late here. 😀

    Thread Starter Ann Donnelly

    (@anndonnelly)

    OMG Andrea is confused! We are all in trouble here! 🙂

    ipstenu – there already is a wp_2_user_roles under wp_2_options and looks to be correct.

    I copied and pasted what was in option_value for wp_user_roles into wp_2_user_roles (even though it looked the same, but it is a very long entry). When I went to backend of site 2 and then Super Admin – Users – I was then able to grant admin status to that user for that site (maybe this was a step I was not doing right all along, perhaps assuming if someone was Super Admin, they’d automatically get privileges for all sites).

    So hopefully it’s working properly now and I can go ahead with my other MU upgrades.

    Thanks so much!

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘Upgrade 3.0 issues w/ tables missing & wp_ vs wp_1’ is closed to new replies.