PDA

View Full Version : Transferring a site from a multisite installation



Business Attorney
03-22-2011, 03:06 PM
I have several little Wordpress sites that I play around with that are completely unrelated to each other in content, users, etc... but generally use the same plug-ins and, in a few cases, the same themes. I also have a couple of other sites I want to create. These are basically based on my own personal interests and it is certainly likely that at some point my interests in a particular area will fade. Rather than just let a site sit dying, I might want to transfer it to someone else.

To avoid having to constantly upgrade plug-ins and themes individually on each site, and even just to be able to add a couple of posts to different sites at one sitting without logging in and out multiple times, I am thinking that a multisite installation makes sense. My question is whether I can easily transfer a single site out of a multisite installation.

I know with a single-site Wordpress installation, the transfer process is pretty easy. If I understand what I am reading, a multisite installation keeps all of the content in a single database. I have tried to find an answer as to whether it is possible to split off a single site from a multisite installation, and, if so, whether it is straightforward or complicated.

Can any of you Wordpress gurus give me any guidance?

CloptonCapital
03-22-2011, 03:15 PM
To split off a single site from a multi site it's likely best to create a new directory for the single site and copy but dont move the necessary files. There is no danger in leaving behind files that aren't needed. I host 20 sites out of one server and I deal with these things all the time and wouldn't say it is complicated.

Business Attorney
03-22-2011, 03:29 PM
To split off a single site from a multi site it's likely best to create a new directory for the single site and copy but dont move the necessary files. There is no danger in leaving behind files that aren't needed. I host 20 sites out of one server and I deal with these things all the time and wouldn't say it is complicated.

So, does that mean that the old site's data will always sit in the database? I am talking about very small sites, so it is not really a big issue. Just wondering.

vangogh
03-22-2011, 05:11 PM
David it shouldn't be any harder to move the multi-site than a single site. Everything is still stored in the same database. Each site gets it's own table prefix. Here's an image of what the db looks like (http://wpcandy.com/teaches/how-to-enable-multisite/attachment/multisite-database).

You can see tables for wp_options and wp_2_options, etc. You get a new set of tables within the database for each site. The trick of course is knowing which prefix applies to which site, but that shouldn't be too hard to figure out.

If you're moving a site you don't have access the database either. You can export all posts, pages, and comments. as an xml file and then import that file into the new install. Coping over the database is sometimes nice since it brings over your settings as well. In either case you still need to reinstall plugin and theme files or just copy them to their new location.

There are also a number of plugins that make backing up and moving a site easier.

Overall though it won't be any more difficult to move a multisite to its own single install. However I'd guess once you're used to using multisite you won't want to. It really is easier to manage multiple sites through multisite once you have it set up and are used to working with a network of sites rather than a single install.

Harold Mansfield
03-23-2011, 01:13 AM
Why not just use domain mapping to put the site you want to move on it's own domain instead? That way you can still run it under the same administration. Of are you moving the site to a new host or selling it?

Business Attorney
03-23-2011, 10:51 AM
Why not just use domain mapping to put the site you want to move on it's own domain instead? That way you can still run it under the same administration. Of are you moving the site to a new host or selling it?

My original question was about the ease of moving a site to a new host or selling it. If I want to do either, am I going to find it difficult to do if I run the sites under a multi-site installation?

Cloptoncapital said that it wasn't difficult to transfer a site by copying the files to a new directory but also seemed to say that I should still leave the original database untouched after the transfer. Since I am talking about some very small sites, it would probably not be an overwhelming problem to keep the unneeded tables in the original database if that is what is needed, but my second post was asking whether the tables related to the now-transferred site really need to be kept forever.

I understand from reading some articles on the multi-site features that some tables (such as users) are available to all sites within the multi-site installation, so I can see why you can't delete everything related to a transferred site, but it seems that no other site would need to call the wp_2_options table (to use Steve's example).

vangogh
03-23-2011, 11:04 AM
It shouldn't be an issue deleting the wp_2 tables if you're removing the wp_2 blog. The shared tables like users you would want to keep of course. I think the user and usermeta tables are the only ones that are shared that you'd need to think about. The other tables in the image I linked to that are part of wp, but not wp_2 are specific to running the multisite network. It looks like only the user and usermeta tables would be ones you'd need in addition to the prefix specific tables.

I guess I need to ammend my it's not any more difficult to it's perhaps slightly more difficult, though not anything that should cause problems. If the only registered user of the site is yourself it won't be an issue at all. If you do have a lot of registered users then you might need to go through the user tables and determine if all the users stored should become users of the new single site, or only some.

Business Attorney
03-23-2011, 11:20 AM
I guess I need to ammend my it's not any more difficult to it's perhaps slightly more difficult, though not anything that should cause problems. If the only registered user of the site is yourself it won't be an issue at all. If you do have a lot of registered users then you might need to go through the user tables and determine if all the users stored should become users of the new single site, or only some.

Good point. The sites I am talking about are just sites that I play around with and offhand I don't even know if anyone has ever registered as a user (I think some have) as it is really meaningless to me. Making someone a user of a spun off site that he never signed up for doesn't seem like a big deal in my case, but I could see if you were running two different sites with lots of users of each, choosing a multi-site installation could be a little messy if you ever needed to separate the sites.

vangogh
03-23-2011, 12:03 PM
Yeah, I'm going to guess it won't be an issue for you. In the case of sites that do generate a lot of users and have their users be registered on different domains in the multisite network they probably don't want to move. However I'd suggest they don't want to move because they want the features of multisite such as having users be registered for multiple sites.

In your case though, I'm guessing the only user you'd need to move is you and database or no, it should be pretty easy to set yourself up on the new site. If you have guest authors set up that might be another case. Quite honestly though I think once you're using multisite you won't feel any need to move one site off as a single site.

Business Attorney
03-23-2011, 12:37 PM
Quite honestly though I think once you're using multisite you won't feel any need to move one site off as a single site.

Right. I am just thinking that in the future I may want to sell a site that I am tired of but which may have some value to someone else. I would hate to set it up in a way that makes selling one site so much trouble that it is easier to just let it die.

vangogh
03-23-2011, 01:57 PM
I can understand. I don't think it will be a problem if that time comes. Worst case is hiring someone like me to help move the site, but it wouldn't be a major cost and it's also something you could build into the price of the sale. Odds are you wouldn't even need to hire anyone to move the site. The only potential issue revolves around transferring users from multi to single. I don't think it would be a major issue either.

Business Attorney
03-23-2011, 04:48 PM
Thanks for all the help. What a great place this is!

CloptonCapital
03-24-2011, 01:59 AM
So, does that mean that the old site's data will always sit in the database? I am talking about very small sites, so it is not really a big issue. Just wondering.

yeah, just make sure the webpages aren't still visible, I simply rename them oldnameoffile_backup so I can always retrieve. If you don't you could have an issue with duplicate content, if SEO is your thing