• Resolved elCapitan28

    (@wsnider28)


    What I’m trying to accomplish is the same as many others before me: Multisite installation currently looks like this:

    domain.com (main site)
    two.domain.com
    three.domain.com

    …and I want to take the site that’s currently at two.domain.com and move it to domain.com. (In my case, I don’t really care what happens with the site currently at domain.com. There’s nothing really built there right now.)

    So I’ve already found the wonderful instructions @ipstenu has provided here (“Switching the Main Blog on Multisite”) and was all ready to hold my breath and start making changes, but ran into a problem right away on Step 1. I don’t know whether this is a result of WP updates, or the fact that I’m using Multisite with subdomains as opposed to sub-folders, but where Ipstenu says to “change the path and leave ‘Update siteurl and home as well’ checked,” I don’t have that option. I have no separate “Path” field, and no checkbox at all. When I go to edit a site, and am on the Info tab, all I see are the following fields:

    Site Address (URL): https://two.domain.com
    Registered: [date]
    Last Updated: [date]
    Attributes (checkboxes): [Public] (which is checked), [Archived, Spam, Deleted, Mature]

    So do I just make the change to the URL in the Site Address (URL) field? What about the checkbox I don’t see? A bit scared to proceed without knowing what it will do.

    Thanks!

Viewing 15 replies - 1 through 15 (of 24 total)
  • That article is very old. There is no checkbox anymore. You can edit the Site URL and change the path. Then update BLOG_ID_CURRENT_SITE with the new site ID.

    Note: I have never change the path of a subsite to ‘/’. I think it should work, but dont know for sure. Changing the path to ‘/somethingelse’ works fine.

    Update: sorry you are asking about domains. IMO, it should work =)

    Thread Starter elCapitan28

    (@wsnider28)

    Thanks for the input. I know it was relatively old, but it was the most recent, detailed info I could find that matched my scenario.

    Wish I could get Ipstenu to chime in and confirm.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    You rang?

    It works fine without the checkbox now ?? I need to update the screenshots in the book too, but yes, it’s just fine with subdomains and subfolders AND mapped domains.

    Thread Starter elCapitan28

    (@wsnider28)

    Haha. Look at that service! OK, thanks. Off to go give it a shot.

    Thread Starter elCapitan28

    (@wsnider28)

    Hmm, followed all the steps, but lost a lot of theme settings, and most images weren’t showing. That normal?

    > Hmm, followed all the steps, but lost a lot of theme settings, and most images weren’t showing. That normal?

    It shouldnt be doing that. Are you using absolute urls?

    Just for fun, I changed the siteurl of one my (non-production) subsites. The theme and images worked fine with the new (site) url.

    Thread Starter elCapitan28

    (@wsnider28)

    Yes, swapped

    https://www.domain.com

    and

    https://two.domain.com

    verbatim.

    (I know, I know, I’ve got the “www” there. But that’s how the main site is now, and it was sort of dictated by how the hosting was set up.)

    The theme settings and images were lost immediately, and even after using the Velvet Blues Update URLs plugin, no change.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I tested it before I posted it was still working and lost nothing. (I won’t judge your www.)

    Check the URL on the images. Where are they pointing? THAT should stay at /wp-content/uploads/2016 for what is now two.domain.com and /wp-content/uploads/site/2/2016/ for what is now domain.com

    Thread Starter elCapitan28

    (@wsnider28)

    Well, the images that are missing are pointing at /wp-content/uploads/2016 for what is now domain.com (which is wrong, according to your comment), so my first question is how to I change that, globally? Even if I try to change an image manually, my media library has all of the items listed, but they’re all broken images in the library too.

    Second, I’m still confused why my theme settings are lost. Actually, I should say that when I’m on the backend of what is now domain.com, the theme settings look correct. They’re just not being reflected on the front-end, the way they were back when it was two.domain.com.

    Thread Starter elCapitan28

    (@wsnider28)

    …maybe something to do with the fact that I’m using child themes?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Themes are 100% unrelated to where your images are located.

    Well, the images that are missing are pointing at /wp-content/uploads/2016 for what is now domain.com (which is wrong, according to your comment), so my first question is how to I change that, globally?

    The question back attcha – How did you change that the first time?

    The theme settings and images were lost immediately, and even after using the Velvet Blues Update URLs plugin, no change.

    That has multiple options, what ones did you pick?

    The wp-cli call is :

    wp search-replace 'example.com' 'example.com/new' wp_posts wp_postmeta --dry-run
    wp search-replace 'example.com/two' 'example.com' wp_2_posts wp_2_postmeta --dry-run

    And I suspect this borked because that replaces images and links. Except … that shouldn;t, since two.example.com/wp-content... is the same as example.com/wp-content

    https://ipstenu.org/wp-content/uploads/sites/2/2014/08/14871095597_b3ee4d1251_o-452×300.jpg

    and

    https://halfelf.org/wp-content/uploads/sites/2/2014/08/14871095597_b3ee4d1251_o-452×300.jpg

    are the same image. Unless you change ‘sites/2’ it doesn’t matter.

    Thread Starter elCapitan28

    (@wsnider28)

    The question back attcha – How did you change that the first time?

    I didn’t, at least not that I know of. The timeline of events went like this:

    1- change the URL on two.domain.com to domain.com
    2- change define('BLOG_ID_CURRENT_SITE', 1); to 2
    3- change the URL on the original domain.com to two.domain.com

    …then I went to the site to look, and theme settings and images were not displaying…

    4- used the Velvet Blues Update URLs plugin on the site that is now domain.com, and changed anything that was two.domain.com to domain.com, and checked the boxes for URLs in page content, URLs in excerpts, and URLs in links (not URLs for attachments)

    …took a look at the site again, still nothing fixed.

    Is it strange that the media library itself (in what is now domain.com) shows all broken images, as well? The media items are there in the list, but images for them are not. And I don’t know how to explain the theme settings being correct on the backend, but not displaying properly on the front end.

    Thanks for helping!

    Thread Starter elCapitan28

    (@wsnider28)

    Add’l info:

    Like I said, on what is now domain.com, images are pointing to

    /wp-content/uploads/2016

    …but the images are ACTUALLY in…

    /wp-content/uploads/sites/2/2016

    I don’t know how that would have been changed (even with the Velvet Blues URL plugin), nor do I know how to go about fixing that. Lastly, is the image location really going to solve the problem with theme settings? Oh, man, it looked so easy… ??

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    used the Velvet Blues Update URLs plugin on the site that is now domain.com, and changed anything that was two.domain.com to domain.com, and checked the boxes for URLs in page content, URLs in excerpts, and URLs in links (not URLs for attachments)

    That was what I was wondering… But it was broken before then.

    Go to https://example.com/wp-admin/network/

    Click on Sites > All Sites

    Hover over one of the sites (doesn’t matter which) and click edit.

    Click on the SETTINGS tab

    What are the values for:

    * Upload Url Path
    * Upload Path

    DO NOT CHANGE THEM! Just asking ??

    Thread Starter elCapitan28

    (@wsnider28)

    Went into the Settings tab on what is now domain.com. Both of those fields are blank.

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘Swapping Main Site on Multi-Site: trouble with Ipstenu's instructions’ is closed to new replies.