Migrate WP single Subdomains into WP Multisite

Remember short-link to MUST-HAVE WP plugins: puvox.software/wordpress 

You remember we had a topic Migrate (Convert) WordPress into Multisite installation. Someone asked how to do that manually with subdomains, which were created with single WP installations. Well, with very quick answer, what I remember, you need to follow very accurate steps to achieve that:

  • At first, create backups of databases for 3 of those sites.
  • Subdomains! this in necessary step (leaving this step, will make you to fail): do you use VPS where you can have a wildcard subdomains? If so, then you can delete the manually created sub1 and sub2 (so, as all subdomains should be autoamtically mapped to main domain). If you use shared-hosting, then you MUST ask to support if your package nativelly support WP multisites with **subdomains** (really, you should ask that) and they will tell you what needs to be changed on your hosting configuration. In worst scenario, you might be still able to create subdomains manually from your hosting.
  • Now, setup WP Multisite with subdomains option, and from Networkpanel, create sub1 and so on…
  • Determine the IDs of the sub1 site. (let’s say, it’s 2). Then go to phpMyAdmin of MS site, and in wp2_posts, delete the dummy entries, and import the table from sub1 wp_posts. do same for wp_postmeta, wp_term* (all of those 4 tables), wp_comments, wp_commentsmeta, and wp_options (but not wp_users, wp_usermeta) . (DO THE SAME for sub2).
  • I suggest that you manually re-created the users in new MS site. Otherwise,  you have to manually combine both wp_users and wp_usermeta tables into MS site’s wp_users and wp_usermeta, or use user-migration (export) plugin to migrate users from subdomain to new MS site.

Probably I’ve missed some important points too, but let me know in comments…

Leave a Reply

Your email address will not be published. Required fields are marked *