WordPress.org

Ready to get started?Download WordPress

Forums

Tricky multisite move (14 posts)

  1. LookLively
    Member
    Posted 7 months ago #

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

    The new install is in place;
    http://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?

  2. Paul Barthmaier
    Contributor Day Volunteer
    Posted 7 months ago #

    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.

  3. LookLively
    Member
    Posted 7 months ago #

    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.

  4. 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.

  5. LookLively
    Member
    Posted 7 months ago #

    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.

  6. 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.

  7. LookLively
    Member
    Posted 7 months ago #

    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.

  8. LookLively
    Member
    Posted 7 months ago #

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

  9. LookLively
    Member
    Posted 7 months ago #

    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.
    http://77.72.201.176/~absolute

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

    Losing hair here...

    Any suggestions very welcomed.

  10. 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.

  11. LookLively
    Member
    Posted 7 months ago #

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

    New (hopefully !) location;
    http://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.

  12. 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.

  13. LookLively
    Member
    Posted 7 months ago #

    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?

Reply

You must log in to post.

About this Topic