Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am looking for a safe way to import independent blogs into a WordPress MU installation.

The basic idea is to merge multiple blogs running on subdomains into a single wordpress installation with MU feature.

I can use the WordPress export/import feature but it would not work in my case with some of the blogs having a lot of content. I have played with this option. Not worth it. Export would time out even on localhost.

I also need the postid to remain same so that links do not break.

I have spent a lot of time looking at the options I have. Import using PHPMYADMIN seems to be the only way out. But I am not sure what would be a safe way to import using this route!

Any ideas!

share|improve this question
    
Are you proficient with PHP? Are the sites on the same physical server? –  MikeSchinkel Jan 27 '11 at 22:44
    
Same server? How many blog? How many domain (or sub-domain)? Total user combined (same username?)? –  zeo Feb 5 '11 at 3:15

3 Answers 3

I don't know of you like the sound of domain mapping but check out http://codex.wordpress.org/Migrating_Multiple_Blogs_into_WordPress_3.0_Multisite and check out number 6 if they are on the same server. If not import seperate install into them so that number 6 works.

share|improve this answer

I can use the WordPress export/import feature but it would not work in my case with some of the blogs having a lot of content. I have played with this option. Not worth it. Export would time out even on localhost.

Have you tried increasing the php script execution timeout values in your php.ini file (or perhaps in .htaccess)? I think I'd try that route first, if possible. You probably could set max_execution_time = 180, or perhaps even higher. It's possible that you might also need to bump up the memory limit, too. Add something like this to your wp-config.php:

define('WP_MEMORY_LIMIT', '160M');

Then, on the import side, you might run into upload size limits. Another php.ini tweak:

upload_max_filesize = 96M
post_max_size = 96M

Alternately, it's possible to split the WXR file into smaller pieces. I have a perl script for this, but I wrote it for a client, and would need permission to share it. But if you're interested, I can ask.

A little-known secret of the importer is that it will skip over information that it has previously imported. So if you get past the upload size limits, but the import times out part-way through, just try importing the same file again. It will quickly skip over the data that's already in the database, then pick up again where it left off. But that makes me nervous, because it's not foolproof: If it imports a post, but times out before saving the all the post's metadata, the metadata might get skipped.

share|improve this answer

Another option that I've seen eliminates the WordPress export/import option and goes directly to SQL dumps. The basic procedure is to create the new domain in multisite to get the ID, tables, etc., then do a SQL dump from the original, remove some tables from the dump (options, etc.), modify the remaining table names within the dump to match the database table names in multisite, then import the SQL dump and do housekeeping (author IDs, etc.).

Step-by-step at http://www.clausconrad.com/blog/migrating-a-bunch-of-wordpress-blogs-to-a-single-wordpress-3-multi-site-installation

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.