Forums

[resolved] Migrating WP MultiSite Setup from one domain to another (13 posts)

  1. shoaibi
    Member
    Posted 10 months ago #

    I have migrated my wordpress(with network sites enabled) to another domain, changed domain in wp-config.php and change the domain column for the only blog in wp_blogs table in db to the new domain. Problem is i don't see Network Menu anymore when i click my username.

    If i delete everything else besides:
    define('WP_ALLOW_MULTISITE', true);
    and click on network setup, it says that the network is already setup, still i repaste the shown instructions in wp-config.php[after deleting previous] and .htaccess, but no use.

    PS:
    I also changed my username from "a" to webmaster in db during the process, changed it everywhere.

  2. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 10 months ago #

    Did you also edit your .htaccess?

    You also need to search your WHOLE database for all instances of olddomain and replace it with newdomain.

  3. Andrea_r
    team pirate
    Posted 10 months ago #

    I also changed my username from "a" to webmaster in db during the process, changed it everywhere.

    then you also knocked yourself off as a super admin.

  4. shoaibi
    Member
    Posted 10 months ago #

    @ipstenu: already did that.

    @Andrea_r: Hmmm, and how would i fix that? changing username back to admin? or is there another solution.

    I might be repeating myself but i change username and domain throughout the database and grep on the db files shows 0 records for old user or domain.

  5. Andrea_r
    team pirate
    Posted 10 months ago #

    Go look in the db in the... uh... usermeta table. there's a record there that saves the super admin's username.

    Or, change your name back to admin, make a new user with the username you want, promote them to super admin as well, then just... leave the admin username with a superhard password.

    I know some security tips say remove that user, but I've also seen people sign up with the admin username if it didn't exist. ;)

  6. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 10 months ago #

    change the domain column for the only blog in wp_blogs table in db to the new domain.

    You only said you did the wp_blogs so ... Being careful :)

    Go into wp_sitemeta

    Look for the meta_key for site_admins and make sure your NAME is there.

    (ETA: Andrea, I just looked in usermeta and can't find it there... Elf needs more coffee, though)

  7. shoaibi
    Member
    Posted 10 months ago #

    my wp_sitemeta contains
    8 1 site_admins a:1:{i:0;s:1:"webmaster";}

    while wp_users has:
    1 webmaster $P$BT5BVrX0G9fJldLX/chVt2ZfcbZDKc0 webmaster .......

    but still doesn't work.

  8. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 10 months ago #

    Dang it, there;s another place that I'm not thinking of ... Was the old user name really just 'a' or was it 'admin'?

    You MIGHT be able to search the whole db for "a" (in quotes) ...

  9. Andrea_r
    team pirate
    Posted 10 months ago #

    :{i:0;s:1:"webmaster";}

    See the s:1? that's wrong. s is the character count of the word in quotes.

  10. shoaibi
    Member
    Posted 10 months ago #

    It was just 'a' and searching for "a" turns 0 results.
    I am gonna take a dump of db and then change all webmaster back to 'a' to see if it works. If it does i will ask you people for a proper way to create a new super administrator and disable 'a'.

  11. shoaibi
    Member
    Posted 10 months ago #

    @Andrea_r
    and bullz eye, that was the issue. Thanks a lot, really appreciate your help.

    @Iptenu, thanks :)

  12. Andrea_r
    team pirate
    Posted 10 months ago #

    oh computers.. so picky at being specific. :D

  13. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 10 months ago #

    Oh dang, I forgot it counted words! Silly computers!

Reply

You must log in to post.

About this Topic