• Resolved Inposure

    (@liangzai)


    Scenario:

    * 1 stand-alone self-hosted WP blog a.com
    * 1 multisite self-hosted WP blog with three domains b.org (main), c.net, d.info

    I decided to finally incorporate the old a.com into my multisite setup.

    I didn’t fiddle with DNS settings, as it works just fine adding a new domain new.b.org to /etc/hosts on both server and client. new.b.org installed fine, and I shaped it as planned.

    Then I changed the apache configuration to let a.com point to my mulstisite install, and restarted. I added a.com in WP and made it a primary domain.

    From my point of view, all these steps are just PITA, since I don’t want subdomains, but real domains. Therefore I want to get rid of the initial new.b.org and just retain a.com, just the way I did with my other three domains.

    This obviously involves poking around in all option pages, but somehow I just can’t get rid of it entirely this time. In the admin panel, the Web Sites menu still retains new.b.org, although all references to new.b.org are wiped from the database (I did a thorough grep of a dump), except for a text string referencing a google search on new.b.org in the panel prefs (which possibly can’t be the culprit).

    What am I missing here? Where should I go to kill the last instance of new.b.org?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    What domain mapping plugin are you using?

    Thread Starter Inposure

    (@liangzai)

    WordPress MU Domain Mapping 0.5.4.1

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Did you check the box to allow remote login?

    The login page will probably stay new.b.org, but the dashboard and the rest will go to newdomain.com

    I wouldn’t be messing with the DB, though, as you shouldn’t need to and you’ll break stuff.

    Thread Starter Inposure

    (@liangzai)

    No difference. The point is that WP can’t come up with new.b.org at random, it must be picked from the DB. And I can’t find it there.

    siteurl = a.com
    home = a.com

    etc. Can’t find anything in the main blogs options or other tables either.

    new.b.org is nowhere to be found, not even in serialized array strings.

    Everything works as intended, except for the admin bar and other places where all blogs are listed; it will show new.b.org rather than a.com in those places.

    If I follow that link, I will be redirected to my 404 page, since there is no such blog. (And later I have also removed new.b.org from /etc/hosts, and I don’t have a wildcard DNS setting, so the host doesn’t exist.)

    It is not a cache issue… just tried logging in from a fresh test browser. Unless there is a hidden files cache that WP uses.

    So WP doesn’t seem to resolve existing blog URLs from any obvious settings, and I am completely lost trying to follow the code into any depth.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    The plugin you’re using is supposed to seamlessly handle it for you, which is why I’m smacking your hands to get you out of the DB ??

    WP MUST know that a.com == blah.b.org, so it can parse your code. If you screw around with that in the DB, you screw up your site (unless you’re only editing the wp_x_posts table to fix internal links, which is sensible and fine).

    Normally I’d point you to https://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/ for a how-to, since I think you set this up worong, but Otto’s getting a 502 for me ??

    The free plugin still does show the subdomain in some places. There is a paid one that hides them all.

    If you really do plan on editing the db directly and never plan on UN mapping the sites, do a search on *all* tables to find what you missed.

    Thread Starter Inposure

    (@liangzai)

    Actually, no. My c.net and d.info have no corresponding c.b.org and d.b.org, since I deleted them. It has been done before.

    WP just needs associate domains with IDs, no need for extra subdomains. That is a leftover from old MU, it shouldn’t be that complicated.

    Thread Starter Inposure

    (@liangzai)

    @andrea_r: OK, so I guess it still is hidden somewhere, just that I can’t find it; have to look more carefully.

    Didn’t know there was a paid version ?? But then it makes more sense and gives me a better clue.

    Thread Starter Inposure

    (@liangzai)

    Eureka!

    Turned out to be a cache problem after all… APC seems to have stored the old domain name in its cache and never updated, probably because the relevant PHP scripts were untouched. Cache should expire after 2 hours, though. Simple restart of apache revealed the problem.

    Poking myself in the forehead, telling myself to remember…

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    You can restart httpd to flush APC, by the way ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Can't get rid of secondary domain’ is closed to new replies.