The MU forums have moved to WordPress.org

Moving one site from MU installation to another (8 posts)

  1. jtoothman
    Member
    Posted 16 years ago #

    I am looking for a procedure that will move one single site in a development WordPress MU environment to a production MU environment. I do not want to move the entire MU installation. Just a single site. The move would bring all the content and plugin/theme/widget settings. But (probably) not the users. And the blog IDs would be different on the two environment.

    Both environments using subdomain MU configuration.

    To illustrate:

    http:// devsite.devdomain.com is being built on a development system. with initial content (cateogries, pages, posts, etc) and configuration of plugins. There are many other dev subdomains in the MU environment that are not ready for production deployment

    When it is done it needs to be moved a different MU system and under the URL to http://prodsite.proddomain.com on a production MU system with many other blogs already running.

    I understand the moving of all plugin and themes folders. What's stumping me is the data migration. Understand exporting the wp_#_tables and doing search and replace on the .sql for updated blog id number and new URL.

    But how do i deal with the shared tables? wp_user, wp_usermeta, wp_blogs Aren't there necessary settings in there that need to be migrated? Does someone have a procedure documented?

    Advance thanks for your help

  2. mercime
    Member
    Posted 16 years ago #

    It would be done as simply as Tools > Export XML from the one subdomain site and importing said XML to production subdomain site. As you import, process will ask whether you want to create new author for user from XML. So, Before you import XML/WXR to new site, you could create the users in production subdomain site so when you import the XML/WXR, you would easily assign posts of users from old site to new site via dropdown. Whichever works for you. Then upload themes and mu- and regular plugins.

  3. jtoothman
    Member
    Posted 16 years ago #

    @mercime

    Correct me if I'm wrong here, but all the plugin configurations/settings and postions of widgets in the sidebar of the theme do not migrate with the Export/Import XML process.

    So even if I went that route, I would still have to spend a lot of time reconfiguring the theme and plugin settings. And that's been sucking up too much time.

  4. andrea_r
    Moderator
    Posted 16 years ago #

    @jtoothman you;re correct the Export just grabs the cotnent, not the plugin settings.

    You need to go into the database and export all the wp_X_whatever tables for that blog. Then, on the new system, find out what that blog's ID will be (make it empty first on the new system) and then plunk in the db content from the old site.

    Assuming you've got all the same plugins & themes on the new site, you should be okay.

    Setting up the new blog *first*, just adding it blank with the right admin user, helps create the needed items for the sitewide tables.

  5. mercime
    Member
    Posted 16 years ago #

    @jtoothman: my bad, it was a personal preference clean installs and using notes made in development re themes, plugins and settings (easy on one site) to set up in new site and also there are problems at times when importing said SQLs spec. with options from old, but that's just me.

    To add on to what andrea_r mentioned above, after creating a new blog first in your new WPMU, check the new blog ID # of that blog in Site Admin.
    - If, for example, new blog ID is 2 and your SQL tables from development site are wp_2_xxx, then import SQL as is along with wp_xxx tables.
    - If, for example, new blog ID is 5 and your SQL tables from development are wp_2_xxx, then Open up the .sql in plain text or and globally replace wp_2_xxx with wp_5_xxx before importing along with wp_xxx tables

  6. jtoothman
    Member
    Posted 16 years ago #

    @andrea_r

    Cool. thanks for your input.

    What do you think the best strategy is for dealing with the wp_users and wp_usermeta tables is between the DEV and PROD systems?

    The issue being that in wp_#_posts post_author IDs map to rows in wp_users. So if the users ids are different between the systems as well as the User roles on the blog, it would probably cause a ton of problems right?

  7. jtoothman
    Member
    Posted 16 years ago #

    @mercime

    Yes, it does it appear to be a catch-22. Either you can make content author transfer easy (while plugin options is a pain) via xml export/import. But if you go the DB transfer route, dealing with author IDs and user roles becomes the challenge.

    One of the reasons I wan't to go the DB transfer route, is that a lot of theme frameworks are now storing layout settings within the DB (like Thesis). Same issue with pluings like CFORMS.

  8. andrea_r
    Moderator
    Posted 16 years ago #

    So if the users ids are different between the systems as well as the User roles on the blog, it would probably cause a ton of problems right?

    Yep. So you take the initial dump and change the user IDs.

    This tutorial:
    http://bavatuesdays.com/importing-a-single-wp-blog-to-a-wpmu-installation/
    goes over a single WP to MU transfer, but you may get a lot out of it.

About this Topic

  • Started 16 years ago by jtoothman
  • Latest reply from andrea_r