• I want to move the physical location of my multisite installation so that it will be located at the subdomain where its URLs imply that it is. The page URLs that show up in the browser and the URLs in the SERPs are in the subdomain that I made using my webhost’s Cpanel. I want to keep this subdomain address because it improves my site’s SEO performance. My WordPress installation is physically located at the domain root; a wildcard 301 redirect brings the visitor to the correct page.

    My problem is that I can’t set my preference for non-www URLs in Webmaster Tools because Google demands that I do that from the site at my domain root, and since there isn’t any site with that address, Google says it can’t crawl through the “bluff” site at the domain root that I tried to add to Webmaster tools. I can’t put up a site at the domain root via my multisite network because its base address is in the subdomain. I thought I could solve this problem by making a WordPress installation in a subdirectory of the domain root. I edited .htaccess to point to the subdirectory where I put the new install, but the wildcard redirect brings me straight to the subdomain address, so I can’t access the dashboard of the new WordPress installation.

    How can I move the WordPress installation that contains my multisite network? Will I have to edit database tables? I already have six sites, four child themes, and over 50 pages all linked together beautifully, so I don’t want to mess this up.

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

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_Multisite

    If the domain/urls in WP aren’t changing, then pick up the files and toss ’em in the new location. Done.

    Thread Starter CKatzman

    (@ckatzman)

    When I move the physical location of the WordPress core files and eliminate the redirect, won’t I need to change the value of WP_SITEURL in the wp_options table in my database?

    Also, as long as I’m moving, I’d really prefer putting the WordPress core files of my multisite network in a subdirectory of that same subdomain. Is this possible, and if so, what changes will it necessitate to other files, such as wp-config.php or .htacess?

    Will this arrangement actually allow me to have a second fully functional WordPress installation at the domain root (and others in additional subdomains)?

    Thread Starter CKatzman

    (@ckatzman)

    Bluehost could not figure out where the redirect is coming from. They did tell me that the database HomeURL and SiteURL are both equal to the subdomain base address, just the way I wanted it, so it will not be necessary to make changes to the database. One technician told me this is the problem causing the mysterious redirect, but I’m sure he’s wrong.

    We also checked the Bluehost control panel redirect page, but there isn’t any redirect there.

    I also checked the support forums and found that it’s possible to have multiple WordPress installations on the same domain, and that each follows the instructions of .htaccess in the subdirectory of its own the WordPress installation. The technician told me that .htaccess at the root is always used first and then it checks for additional instructions where the installation resides. That made sense, so I tried replacing the contents of .htaccess in the domain root where I had multisite rules with a fresh copy of .htaccess for a new WordPress installation. Not only did this leave the redirect in place, it also left me unable to access parts of the dashboard for my multisite network, so I had to copy the .htaccess file with the multisite rules from my subdomain into the one at the root. Now the multisite network is fine again but I’m still left with the original problem.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    When I move the physical location of the WordPress core files and eliminate the redirect, won’t I need to change the value of WP_SITEURL in the wp_options table in my database?

    Like I said, if the domain/urls in WP aren’t changing….

    Are they? Sometimes it’s VERY helpful if you explain your setup with examples… Like

    WP is installed in /home/user/public_html/subdomain/
    WP runs from http://example.com/

    Home URL is http://example.com/
    Site URL is http://subdomain.example.com/

    But what is ‘the original problem’? You were asking this:

    My problem is that I can’t set my preference for non-www URLs in Webmaster Tools

    Is that still the problem?

    Thread Starter CKatzman

    (@ckatzman)

    The homeURL that the Bluehost tech reported seeing in the database for my multisite network – http:subdomain.example.com – is the one I want as the base address for the multisite network. This means the URLs are really staying the same.

    However, the physical location of the WP installation for the multisite network is changing. I originally installed it at http://example.com and I COPIED it (- OOPS! I think I should have MOVED it -) to http:subdomain.example.com/wordpress.

    In addition, there is a brand new but not yet functional WP installation at http://example.com/wordpress-root whose URL base address is supposed to be http://example.com.

    About a week ago, a Bluehost tech saw that any request for a URL with the base address at the domain root (that is, http://example.com or http://example.com/subdirectory) brings the visitor to the corresponding address at the subdomain. He told me that there is a wildcard redirect doing this.

    I now believe that there never was a real 301 redirect. If there was, I would have found it either in .htaccess at the domain root address (in the public html folder) or in the Cpanel redirect page. Therefore, I presume that this motion in the direction of the subdomain is caused by the presence of the original WP installation at the domain root whose base address is in the subdomain.

    When I tried renaming all the wp- files at the domain root, I got a 500 error on my site. I figured the problem was that I had to indicate that both installations are in subdirectories, so I followed the Codex instructions for putting WP in its own subdirectory, and I added the following to the .htaccess file at the domain root:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www.)?example.com$
    RewriteRule ^(/)?$ subdirectory [L]

    All this got me was the “white screen of death”. I tried putting this code for just one installation at a time and also tried it for both at once. I tried inserting it right below end wordpress, or right above begin wordpress, but the “white screen of death” remained.

    I took out all the changes to .htaccess and restored the original file names at the domain root. My multisite network is working again, but I still am left with the original problem: no crawlable site at the domain root, and therefore, no way to set my preference for non-www URLs in Webmaster Tools.

    Thread Starter CKatzman

    (@ckatzman)

    Please note: When I did the above testing, I already had a second .htaccess at the subdomain base address (at http://subdomain.example.com) with wordpress rules and with my multisite rules. I had also already added the following code into http://subdomain.example.com/wordpress/wp-config.php:

    define('WP_SITEURL', 'http://subdomain.example.com/wordpress');

    in between define('WP_DEBUG', false); and define('MULTISITE', true);

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    You want WP to be installed here: /home/user/public_html

    But you want the BASE url to be this: http://subdomain.example.com

    Yeah, that’s a nightmare. WP will not like it.

    Can we go back a step though? I think we’re attacking this the wrong way, and we need to review WHY we’re doing this at all to make sure we’re doing it right.

    I want to move the physical location of my multisite installation so that it will be located at the subdomain where its URLs imply that it is. The page URLs that show up in the browser and the URLs in the SERPs are in the subdomain that I made using my webhost’s Cpanel. I want to keep this subdomain address because it improves my site’s SEO performance. My WordPress installation is physically located at the domain root; a wildcard 301 redirect brings the visitor to the correct page.

    You are incorrect in assuming that you’ll hurt your SEO by moving from subdomain.domain.com to domain.com – With 301 redirects, you will KEEP all your link juice 🙂

    My problem is that I can’t set my preference for non-www URLs in Webmaster Tools because Google demands that I do that from the site at my domain root

    Your domain ‘root’ is subdomain.domain.com since that’s the URL WP lives at. If you treat THAT as the domain you add to Webmaster tools, it’s all done.

    If you’re trying to change the prefs for domain.com (and not subdomain.domain.com) then the question becomes this: What’s installed at domain.com?

    Thread Starter CKatzman

    (@ckatzman)

    Sorry for the delay – my computer was in the repair shop.

    Current physical location of WP installation with multisite network: http://example.com
    Current base URL of multisite network: http://subdomain.example.com
    I agree that the above sounds nightmarish – but actually WordPress works PERFECTLY with it.

    Desired physical location for WP installation (want to move it to): http://subdomain.example.com
    NO change planned for base URL of multisite network: http://subdomain.example.com

    The issue is not link juice, but rather exact-match domain names. Someone had the domain name I wanted, so I made a subdomain name out of my most important keywords. Doing this dramatically improved my page rank for those keywords. I have only one incoming link that I received after this improvement, so I know it was due to the subdomain name.

    You wrote, “Your domain ‘root’ is subdomain.domain.com since that’s the URL WP lives at. If you treat THAT as the domain you add to Webmaster tools, it’s all done.” Unfortunately, it is NOT all done with that. I did add that subdomain.example.com to Webmaster tools and then tried to set my preference for non-www URLs, but it didn’t work. Webmaster tools gave a message that they only allow a webmaster to set a preference for non- www URLs from the ACTUAL domain root, http://example.com.

    You asked: If you’re trying to change the preferences for domain.com (and not subdomain.domain.com) then the question becomes: What’s installed at domain.com?
    Answer: My WP multisite installation is currently physically located there, but it points to a database whose base URL is http://subdomain.example.com.
    I wanted to have a site with the URL http://example.com, so I installed a single-site WP installation at http://example.com/wordpress, intending to point it to http://example.com , but that installation isn’t functional. I’ve never gotten access to the WP dashboard of that installation, since every address at the domain root gets forwarded to the corresponding address in the subdomain as if there was a wildcard 301 redirect; when I type in http://example.com/wp-admin I arrive at http://subdomain.example.com/wp-admin. This forwarding is not due to an ACTUAL 301 redirect, but to something else that’s going wrong which causes a similar effect.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Desired physical location for WP installation (want to move it to): http://subdomain.example.com
    NO change planned for base URL of multisite network: http://subdomain.example.com

    Okay…

    So pick up all the files and move them. Then search for http://example.com and change it to http://subdomain.example.com in the DB. Make the same change in wp-config.php

    That should be it UNLESS you also goofed with your vhosts when you set this up in the first place. You didn’t say you did, but you’ve left out information before so I have to be skeptical.

    The problem you have with http://example.com/wp-admin punting you to http://subdomain.example.com/wp-admin is pretty much what I meant when I said WP won’t like it. You subverted things. It’s messy.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Moving multisite installation from domain root to subdomain’ is closed to new replies.