• Hi,
    I’ve been tasked with moving a multisite install to a new server.

    The new install is in place;
    https://77.72.201.176/~absolute/

    Its now on the server before repointing the namesservers.
    Its using subdirectories, not subdomains.

    If I don’t add the following multisite code to wp-config

    Multisite
    define('WP_ALLOW_MULTISITE', true);
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    $base = '/';
    define('DOMAIN_CURRENT_SITE', '77.72.201.176/~absolute');
    define('NOBLOGREDIRECT', '77.72.201.176/~absolute');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    I get the frontpage up ok (which is one of the 3x themes/sites), but get 404s for the other 2x themes/sites.

    If I add it, I get a redirection issue;
    Firefox reports that ‘The page isn’t redirecting properly’.

    The htaccess file I got from the existing site was very messy.
    I have used a more generic htaccess.
    See below;

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    # END WordPress

    Can anyone offer any thoughts, please?

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

    (@ipstenu)

    ?????? Advisor and Activist

    The wp-config for a single site does not have the constants that you have above, specifically, there isn’t one labeling your home url. By not adding the above, WordPress thinks that you have a single site installation and knows nothing about the other tables that exist in your database for your virtual sites, ie the other two sites you created for your subsites. The problem is that if you put then information above in the wp-config, it now knows about Multisite and will go check out the database for where to go next. You’ll have to update your database and make sure the tables in the link that Mika gave you have the correct URLs.

    Thread Starter looklively

    (@looklively)

    Thanks Mika and Paul,

    Yes I had seen that codex page, and gone through the database and made those changes already, I have been through it again since posting and it all looks correct.

    Is it possible that the temp url with the tilde (77.72.201.176/~absolute) is causing problems here?
    Would that cause a redirect?

    The site is further complicated in that it was built by inexperienced devs who have used hard-coded urls throughout the site source files.
    I’ve had to re-hardcode the new urls… not ideal , I know.
    But I cant see how that would cause the redirect.

    I’m a competent dev but not that experienced with these aspects of WP.
    I’m confused why I’m getting the redirects.
    It may be something done previously that I can’t see.
    Any suggestions where I might look for the culprit?

    Is htaccess a possibility?
    Do you have to edit it for a multisite?

    Thanks.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    and gone through the database and made those changes already

    Manually or via the plugin/tool we recommend? Cause it matters. A lot.

    Is it possible that the temp url with the tilde (77.72.201.176/~absolute) is causing problems here?
    Would that cause a redirect?

    Only if you didn’t change it all correctly.

    Thread Starter looklively

    (@looklively)

    Manually or via the plugin/tool we recommend? Cause it matters. A lot.

    Both, actually
    I didn’t use search and replace in phpmyadmin (which is the problem here, right?).
    I used the script as suggested, and checked through manually.

    The previous dev did use search and replace to edit the urls, but I think I corrected all these.
    Would this still make a difference if she did this and I went over and corrected correctly, as it were ??

    Tilde:
    Yes, I thought that … if the path is ok, then it should be ok.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    The previous dev did use search and replace to edit the urls, but I think I corrected all these.

    Ugh. Yeah if the previous dev DID NOT use the interconnect script, that’s what’s wrong.

    Thread Starter looklively

    (@looklively)

    Ok, thanks.

    I had suspected that, but what made me think that it was not the cause was that the site is working under is current domain, albeit imperfectly. (It redirects wierdly here and there, and parts of the backend dont work properly).

    Can you recommend a suitable course of action, please?
    I believe the client has a pre-search-and-replace database (but the current database has had a lot of work done to it).
    Is there a way to mend the existing db, or am I better using the old one and re-building the content?

    Thanks.

    Thread Starter looklively

    (@looklively)

    Actually … before you answer that … I’lll just make sure I have a copy of the old db available … and try it out.

    Thread Starter looklively

    (@looklively)

    I’ve tried an old db, and used the correct search and replace script to change the urls.
    It’s still the same.

    I get an unresolving redirect on the splash page if I use the multisite code as above. If I comment that bit out I get the splash page.
    https://77.72.201.176/~absolute

    Either way I get 404s for the rest of the site.
    https://77.72.201.176/~absolute/training

    Losing hair here…

    Any suggestions very welcomed.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    What is the OLD location?

    What is the NEW location?

    You can use examples, but depending on the format of the old setup, you may have to change the wp-config and other parts of the DB manually.

    Thread Starter looklively

    (@looklively)

    Old (existing) location:
    https://absoluteaqua.co.uk

    New (hopefully !) location;
    https://77.72.201.176/~absolute/
    This will have the domain above transferred to it once it is in place and working properly (if ever).

    I’m happy to make changes, if I can work out what they need to be.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    This will have the domain above transferred to it once it is in place and working properly (if ever).

    Okay, just FYI, this is a really bad idea. You’re talking moving TWICE and as you already found out, moving ONCE is a pain.

    You’d be better off moving it, and then changing your personal hosts file to use the new location as the old domain, to see if it works.

    Thread Starter looklively

    (@looklively)

    Yes, moving twice is double-trouble, no doubt.
    But the existing install is problematic both for the reasons here and for additional reasons related to the actual hosting.
    Not ideal.

    I’m sorry but I don’t fully follow your suggestion.
    Please can you elaborate?

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Tricky multisite move’ is closed to new replies.