WordPress.org

Ready to get started?Download WordPress

Forums

Migrating content then switching domain (7 posts)

  1. markwatson
    Member
    Posted 2 years ago #

    I've been single user WP for some time, now getting into the network version, for some pro bono work I'm doing for a voluntary organisation.

    I'm moving their existing website onto wordpress, and onto a new host, and going the network route as they would like two or three subsites for specific purposes, and one to be members only.

    The main complication is that there is huge amount of content to move over, and so I've set up network WP on my host to load content, in advance of getting the domain moved across to the new host.

    So I've got it all running fine, and it's available at http://xx.xx.xx.xx./acme.org.uk (where xx.xx.xx.xx.) is an IP address. The intention being that when the content is ready the domain is transferred across to my host, and I can do away with xx.xx.xx.xx and be http://www.acme.org.uk

    One issue I've come across so far in looking ahead to the transfer is that unlike single WP, I can't just change the url of the site in wpadmin, and have to do this in the database. I've little experience of sql other than a very rare peek into Mysql or myphpadmin, so I'm looking for re-assurance that this isn't too difficult.

    And all the internal links in the content points to xxx.xxx.xx.xx, so I need to change that. And again, I believe that can be done fairly easily in sql, or via a plugin.

    Looking for pointers and reassurance my friends, before a whole load of data transfer this weekend! The domain move will be about 7 days away if the above aren't big issues...

    Any advice appreciated!

    Mark

  2. Do NOT do a blanket search replace.

    The problem is, as you would quickly find, data serialization. Which is to say there are places where the domain name is used, and it's length registered, in data storage. It's annoying.

    Normally what people do is usa fake domain name (like acm2.co.uk) and then from THAT search/replace to acme.co.uk, since the URL lengthns remain the same.

    Now. You CAN do a search and, where appropriate,make the changes your self. wp_posts (and wp_1_posts etc) are safe to change in one go, but NOT wp_x_options. You'll be able to tell the serialized lines, they'll have something like s:27:http://12.3.4.5/acme.org.uk in them. Those are the ones you'd want to change to s:18:http://acme.org.uk

    Or not at all, it possible. The rest of the things to change are in wp_sites and so on, and those should be safe. I left the serialized crap alone and it was okay.

  3. markwatson
    Member
    Posted 2 years ago #

    I'm a bit unclear about the first bit of your response when you refer to the domain name length. The domain bit in the setup I've got http://x.x.x.x/acme.org.uk is fine (ie the site will be http://www.acme.org.uk), so it's a need to just strip out the x.x.x.x)

    The codex http://codex.wordpress.org/Changing_The_Site_URL states that in terms of changing the url you have to do it via the database for network wp.

    In my single wp sites, I can see in Settings/General where the url/site name are changed, but can't see that in the network wp Settings/General, other than define ( 'DOMAIN_CURRENT_SITE', 'x.x.x.x' ); in wp-config.php

    Other than that I can't see any other instances of x.x.x.x in the wp admin.

  4. In the DATABASE. Not the wp-admin.

    The DB is what's going to kill you. Go look there. You'll see.

  5. markwatson
    Member
    Posted 2 years ago #

    Thanks for the continuing help!

    I'm not disputing it's a database issue at all! I'm just not clear how to address the fact that as it's currently working, wp thinks it's http://xx.xx.xx.xx/acme.org.uk , so that pages etc have permalinks http://xx.xx.xx.xx/acme.org.uk.

    I'm not at all familiar with the underlying database side of wp, which doesn't help!

  6. I don't understand what you're asking. It is working today because you have not YET moved WP.

    When you move WP, you want to CHANGE the URL in the Database. Yes?

    When you do that, be VERY careful. Change wp_posts (and wp_2_posts and all other wp_x_posts tables) one table at a time. Then edit the wp_sites table manually (don't search/replace, search/review/edit instead) to remove any calls to xx.xx.xx.xx

    Start by looking at what you have RIGHT NOW to understand what you're going to need to change. Get used to what it looks like, study the settings now, and look at it. But until you go look, you're gonna stay confused :)

  7. markwatson
    Member
    Posted 2 years ago #

    Thanks, this is the kind of help I'm after:

    >
    When you do that, be VERY careful. Change wp_posts (and wp_2_posts and all other wp_x_posts tables) one table at a time. Then edit the wp_sites table manually (don't search/replace, search/review/edit instead) to remove any calls to xx.xx.xx.xx
    >

    Any pointers to this in terms of the codex, or any sites you'd recommend for someone needing to get their head around the database side of things?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags