Moving from multiple install to multi-site

Hi there,

I inherited a network that consisted of multiple sub-domains each with their own WP install, and I've begun to migrate to a single install running MultiSite. I'm left with our Buddypress Site and Marketplace. I'd like to keep the same URLs that they have, but running on the MultiSite install and removing the two instances of WP currently running on those subdomains. Can you recommend how I do this?

Currently, I've been thinking that I should create another domain for each, import db data into MS db, and then delete the previous subdomain. Once that's gone I would recreate a subdomain with the same name on MS. The community site, which as a single install with privacy, will then be part of the large MS network and I will use the Membership plugin to control access.

Does this sound reasonable or fraught with danger?

  • Timothy Bowers

    Hi Pali Baacsi.

    One thing to remember is that the table names will vary here, as each site within your multisite install would have an ID number. You could create the sites in the MS install to ensure all the extras are added into global tables. Then import only the data where needed. You may have issues in matching user IDs to articles though where accounts on different installs don't share the same ID but share the same email address and have their own articles.

    You may wish to have a read of the following article:

    http://codex.wordpress.org/Migrating_Multiple_Blogs_into_WordPress_3.0_Multisite

    Hope this helps. :slight_smile:

  • Timothy Bowers

    No worries. :slight_smile:

    Using the WP import, I believe it does allow you to assign articles to a user... So if you imported all the users into your main install it might then be easier to use the WP importer. Just a thought.

    However you do it, to be sure always keep strong backups and perhaps test this in a sandbox install so you don't affect your live production sites. :slight_smile:

    Take care.

  • Timothy Bowers

    Hi Pali Baacsi

    Yeah the BP profiles would have been part of the main site. Do all the network sites have a BP install?

    If so then you will need to take extra special care of userIDs and accounts, more so than just with a default WP/MU because you will need to merge multiple BuddyPress installs, there are friend connections and various other things to consider as you will see with the data.

    These are the main tables:

    PREFIX_bp_activity
    PREFIX_bp_activity_meta
    PREFIX_bp_friends
    PREFIX_bp_groups
    PREFIX_bp_groups_groupmeta
    PREFIX_bp_groups_members
    PREFIX_bp_messages_messages
    PREFIX_bp_messages_notices
    PREFIX_bp_messages_recipients
    PREFIX_bp_notifications
    PREFIX_bp_user_blogs
    PREFIX_bp_user_blogs_blogmeta
    PREFIX_bp_xprofile_data
    PREFIX_bp_xprofile_fields
    PREFIX_bp_xprofile_groups
    PREFIX_bp_xprofile_meta

    There will also be data in other WP tables relating to the plugin.

    If only one of your installs had BP, I would have most likely been more inclined to use that as the base site. Just personal preference on ordering tasks. :slight_smile:

    Hope this helps.

  • Paul Barthmaier

    Hey Timothy,

    Many thanks for your energy on this one. The thing about this migration is that Buddypress is installed on a subdomain with its own install, so it really isn't an option for the base install. But at this point, I was able to grab the BP data. Many thanks for your help here.

    What I'm finding the greatest problem to be is that I'm on Bluehost and their wildcard subdomain doesn't seem to be working properly. I want to keep the themes that were used on the single installs for the individual sites in the network. This means I would keep Buddypress on a subdomain with the same URL that it had when it was its own installation. However, even though I have selected a different theme for each, the dashboard for them shows only the information from the main site. I believe this is a wildcard issue and I don't have access to httpd.conf to put in a ServerAlias *.mydomain.com. I've fiddled with .htaccess to see if anything there could help, but without any luck.

    I have a ticket in with BH, but if you have any thoughts on this, I'd love some more input.

    Only with Love,
    Paul

  • Timothy Bowers

    Hi Pali Baacsi.

    Just so I get this right, to confirm. You have your main site, you then want BuddyPress to be installed on a sub domain aka subsite of your multisite install?

    Is that correct?

    The issue with BuddyPress is that it installs on the main/root blog just fine, it is designed to do that. For running BP on sub sites (pop this into your wp-config.php:

    Allow BuddyPress to function on multiple blogs of a WPMU installation, not just on one root blog:

    define ( 'BP_ENABLE_MULTIBLOG', true );

    From:

    http://codex.buddypress.org/extending-buddypress/changing-internal-configuration-settings/

    You create a new php file and pop that in there:

    wp-content/plugins/bp-custom.php

    Once wildcard setup is complete it should send everything.yourdomain.com to the root yourdomain.com. WordPress should handle the rest for you. If you use individual domains then of course you need to map them:

    https://premium.wpmudev.org/project/domain-mapping

    If you have a need to run more than one WP network, there is also a plugin for that:

    https://premium.wpmudev.org/project/multi-domains

    Let me know how you get on. :slight_smile:

  • Paul Barthmaier

    Wow!! This is unbelievable information. Many thanks.

    For now tho, I'm thinking I'm going to leave the BP installation on the subdomain that it was on. I was able to accomplish this simply by adding:

    define ( 'BP_ROOT_BLOG', $blog_id );

    I thought I was having trouble because I am using BlueHost, but it seems that there was a plugin BP-registration (not exact name) that wasn't compatible with BP 1.5 and/or Multisite. Things look good once I got rid of that.

    My issue was that I inherited this site and the main blog has a custom theme that the owner paid for and wants to keep which is not BP compatible. I added the Template pack for good measure, but wanted to have BP running on a site with a theme that was explicitly designed to run BP. From what I can see now, I seem to be running just fine and thank you for your great insight. Hopefully this thread will help someone else with a similar issue.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.