Support » Networking WordPress » Changed Primary Site and now previous main site redirects to new primary

  • I have a network site where the old primary site will eventually go away to live on its own, but right now just changed the Primary Site and now when I try to visit the old primary site it redirects to the new primary when visited.

    But, I can get to the site when navigating to it when logged in and navigate to it.
    Also, most of the images are missing on the old primary site. Not all, but most images.

    OLD Primary site: http://www.abcitseasy.com
    NEW Primary site: websites.abettercopy.com

    All sub sites have their own domain

    New sub sites created do appear under the new primary: websites.abettercopy.com/site_name
    Network Admin as well.

    Steps I followed:
    The last post on this link by Andi,
    https://premium.wpmudev.org/forums/topic/how-do-i-change-the-primary-site-on-my-multi-site-network/

    I did not use the velvet blue updater because each site has it’s own domain name.

    1. I changed the Primary Site under “My Sites” to the new domain.
    2. I updated wp-config to this:
      /**
       * Multi-site
       *
       */
      define('MULTISITE', true);
      define('SUBDOMAIN_INSTALL', false);
      $base = '/';
      define('DOMAIN_CURRENT_SITE', 'websites.abettercopy.com');
      define('PATH_CURRENT_SITE', '/');
      define('SITE_ID_CURRENT_SITE', 1);
      define('BLOG_ID_CURRENT_SITE', 13);

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • From your description, your old Primary domain name is still pointed at the server so it is ‘waking up’ WordPress which then responds with the primary under its new domain.

    That seems right and proper to me.

    The images are probably linked using the full URL which is no longer known to WordPress so the image links are broken within the old content being presented by the new domain.

    My suggestion for that is to run the Broken Link Checker plugin and deal with the links it uncovers by using either an amended link with the new domain name or relative links.

    https://wordpress.org/plugins/broken-link-checker/

    You’ll want to throttle back BLC after a couple days… it comes set to peruse the whole site within 3 days (72 hrs). I usually dial that back to 10 days or more as it can become a real resource hog otherwise.

    If you don’t want the old primary domain to open up the site anymore you’ll need to point it at a different subdirectory on your host via the control panel and you’ll need to provide an html page there or else tolerate a 404 error. I’d want a ‘coming soon’ page myself.

    I’ll definitely try the link checker, but the main issue first is that the old primary website is not accessible outside of being logged-in as an administrator. So I’m thinking I have some setting wrong.

    So think there was a misunderstanding, I don’t want to change each sites domain name, those are staying the same, just which site within the install is the Primary Site of the network.

    Like when someone puts in the old primary address of abcitseasy.com I still want it to go to abcitseasy.com which is site 1.

    So should I change SITE_ID_CURRENT_SITE to 13 instead of 1? I think I tried that before and the whole network didn’t work.
    define('SITE_ID_CURRENT_SITE', 1);

    I’m kinda hesitant to keep changing settings as all the other sites are functioning properly and websites.abettercopy.com is functioning as the network primary site.

    • This reply was modified 2 weeks, 5 days ago by .
    • This reply was modified 2 weeks, 5 days ago by .

    So I tried the Broken Link Checker and it didn’t have broken links. Again, the domains of the sites didn’t change, but which site was the network primary site. I’ve gotten the primary site of the network changed, but the old site isn’t appearing anymore.

    But I did play with the multi settings in wp-config some more but still have the same

    For the briefest minute all sites appeared correctly when opened in incognito with these settings, but now abciteasy.com (the old network primary site) still redirects to websites.abettercopy.com
    -site_id was changed from 1 -> 13
    – with this setting the pictures now appear correctly on abciteasy.com while viewed from the admin.
    – abcitseasy.com still redirects to websites.abettercopy.com
    – network admin changed back to the old primary, abcitseasy.com/wp-admin/network/, instead of what I want it to be, websites.abettercopy.com/wp-admin/network

    define('DOMAIN_CURRENT_SITE', 'websites.abettercopy.com');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 13);
    define('BLOG_ID_CURRENT_SITE', 13);

    in the database I changed “wp_site” from http://www.abcitseasy.com to websites.abettercopy.com and didn’t help.

    To get abcitseasy.com to appear again I remove DOMAIN_CURRENT_SITE in wp-config. But still the same problem of missing pictures on abcitseasy.com and the network primary site reverts back to abcitseasy.com instead of the new primary

    Any suggestions would be greatly appreciated.

    Anyone out there have a suggestion? I’m considering trying to remove it to a separate install just to get it working again. Not my preference.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.