WordPress – Migrate individual sites from multisite network

Overview

Your WordPress site has a multisite network if it has the following features::

  • Collection of different WordPress sites controlled by a single WordPress installation.
  • Collection of plugins and themes is shared for all websites in the same network.
  • It is multi-user version of WordPress.
  • Only administrator can install themes and plugins. Other users can only select them from the list made available by the system administrator.

Learn more about “Multisite Network in WordPress“.

Before starting site separation you are suggested to get a backup of your whole WordPress site!

Prerequisite

  1. Login as superadmin to your multisite network. ( find more about this role here )
  2. You will find a new option named “My sites” on the top left of your admin menu.
  3. You can navigate using My Sites > Network Admin > Sites

multisite-network-to-individual_image2

You will get your screen something like this :

multisite-network-to-individual_image3

  1. Get the ID of your site from listed sites
  2. Find ID by selecting the edit option of your site, then the URL should be like http://example.com/wp-admin/network/site-info.php?id=XX

Database Migration

Export the tables of your site from the database

  • Go to the Export tab of your multisite database in phpmyadmin.
  • Select tables relating to your site ID you are exporting.

For example, If your site ID is 2 then see the following:

multisite-network-to-individual_image4

  • Also, select users’ table and usermeta table as they are common for all sites.
  • Export selected tables.
  • Create a new database for the site that you want to create new.
  • Import the exported sql file and rename tables using the coming prefix to match with wordpress table structure.

or you can simply remove the site ids from the table names. such as change {prefix}_{site_id}_{tablename} to {prefix}_{tablename} . ( ex. wp_3_posts => wp_posts).

WordPress Installation

Download a new WordPress installation from here.

  • Extract the downloaded zip to your desired location.
  • Open config.php file and change database details. Use details of the database you just created in step- 4.

Make sure the table prefix in your database and table prefix config.php are the same.

Data Modification

Files

Remove plugins and themes folders from wp-content of the new installation.

  • Copy these folders from your multisite network.
  • Copy your site’s upload data from parent site’s wp‑content/uploads/sites/{ID}/.
  • Create uploads folder in our new wp-content and paste copied data here.

Database

Edit links in the database

  • Change site’s domain from multisite network domain to a new single site domain. For example, if your site was at example.com/site1 , change it to site1.com
  • Check your domains in case your site had a domain mapped to it and it’s not a domain you’re moving it to.

At this point, we have migrated our site physically.

Now login as admin for our newly created site. Users’ data will be the same as the old site. Check permalinks and make sure all URLs are working fine!

mm

Hiteshi Trivedi Web Developer

I am working as a Web Developer at Yudiz Solutions Pvt. Ltd. - a leading mobile app, mobile games & software development company. I like to play merging of WordPress with other frameworks like laravel and Codeigniter. I customize many WP Plugins and Themes including WooCommerce.

Comments are closed.

Top