0

I recently made a copy of my live Multisite network and moved it to a domain for testing. For some reason the links in the "Network Admin" menu are not updating to the new testing domain. These links reside under:

My Sites -> Network Admin -> Dashboard/Sites/Users etc..

I've gone through the database, htaccess files and config files but I'm not sure where the links to the old site are coming from. I can go through each site individually and browser through pages and plugins, etc but when I try to go the Network admin there is a 302 redirect to the old domain. It's very strange.

1

Pat J's answer is correct but left out one important step.

In wp-config.php the DOMAIN_CURRENT_SITE constant must be updated or the behavior that brandozz explains will occur.

When updating domains for a WordPress Multisite:

  1. Update the DOMAIN_CURRENT_SITE constant in wp-config.php

    define('DOMAIN_CURRENT_SITE', 'my-domain-name.com');

  2. In DB table named "wp_sitemeta" update "siteurl" meta key

  3. In DB tables named "wp_{blog_id}_options" update "siteurl" and "home" meta keys
  4. Search for remaining links to update in post content with phpMyAdmin or MySQL command line. Be careful when changing links in JSON or serialized arrays.
0

Each site will have a couple of options in the wp_{blog_id}_options table, named siteurl and home. Additionally, there will be at least siteurl in the wp_sitemeta table, which will define the siteurl for your Multisite network's root site.

Your best bet is probably to change all these values to the new server's URL.

There's a bit of information on the Database Description Codex page -- mostly about the schema -- but most of my knowledge of this comes from a combination of Google and trying things out.

  • Yeah, I've gone through the options tables for each blog and didn't see any references to the old site. I replaced all instances of the old url using a Search & Replace plugin but the old links are still there. Strange that it's actually a 302 redirect. – brandozz Nov 29 '16 at 22:36
  • Does the problem persist if you turn off all your plugins? – Pat J Nov 30 '16 at 4:22
  • I haven't tried that...problem is I can't get to the Network Admin -> Plugins section on the site because of this issue. Do you suggest I deactivate on a per site basis? – brandozz Nov 30 '16 at 22:29
  • You could try installing WP CLI on your local dev machine, and then use something like wp plugin deactivate --network --all. – Pat J Dec 1 '16 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.