Generally, most bloggers use one WordPress installation to host one website. They use subdirectory, subdomain or a new domain for creating additional installations. However, this is not always the case as WordPress also offers a feature to host multiple sites with single installation. This is called WordPress Multisite setup and is useful to manage a network of websites by a single administrator. Sometimes, you may need to change WordPress single site to multisite and vice versa due to change in your requirements. We will explain how to do change the setup in this step by step guide.
WordPress Multisite Setup
Multisite is a type of WordPress installation that allows you to easily make changes or update all your single websites from one place. It offers an additional super administrator user role to manage all sites installed in a single network. The network of sites in the Multisite can incorporate your websites and that of other users (with limitations of access to more powerful WordPress features). Nevertheless, unique features of the Multisite lie in the fact that all website users in the network share the same plugins and themes with separate media upload directories, i.e., you can’t access folders of images and file uploads of one site from another.
You can create a multisite when installing WordPress from your hosting panel. Even the localhost apps like Local allows you to create multisite setup in your computer. you can use this to play around and learn if you want to use multisite for your sites.
Important Note: Multisite and single site in WordPress uses different database setup. Multisite adds each site a separate set of tables and manage the content. If you do not setup multisite properly, you will see database error like below indicating tables are missing in your database. We strongly recommend avoiding conversion of single site to multisite and vice versa unless you really need it.
How to Migrate WordPress Single Site to Multisite?
Importing an already existing single site takes more requirements than adding a new website to a network of websites (Multisite). Single sites migration to a Multisite requires creating a backup of your website (using a tool or service like ManageWP) and enabling the Multisite feature. Here are the ways to go about this process.
Export Single Site Content
Use the ManageWP, Duplicator plugin or any other to back up the site you want to export in case something goes wrong. Once there is the enablement of the multisite feature, consolidation of your single website is now obtainable. Login to your single site dashboard, hover over the “Tools” menu and click on the “Export” tab. Select the “All content” option from the list of export options and click on the “Download Export File” button to convert your site content to a downloadable .xml file.
Create a Multisite WordPress
Login to your hosting account and create a new WordPress installation. You may use a new or temporary domain for this purpose and change the site URL or setup redirects as required. Below is how it looks when you create a new website in SiteGround hosting. After selecting “Temporary Domain” option, you will get a free temporary domain for installing your site.
You can select “Install WordPress Multisite” option and install WordPress in either main folder or in a sub folder (subdirectory).
Add Single Site to a Multisite Network
After installing WordPress multisite setup, login to your multisite network. From the dashboard, move your mouse to the “Sites” side menu and click on “Add New”. Fill in the site address (URL), site title and admin email of the site you are moving into the multisite, then click the “Add Site” button if all information is correct. You can click the “All Sites” tab to confirm the successful addition of your single site to the network.
Setup Site Theme and Plugins
Now, reinstall & activate all those plugins or themes you were using in the former site that you had to deactivate when moving your single website to a multisite network. This time around, the installations and activation would occur at the network level of the multisite so they would be available for the incoming site. Head over to your multisite dashboard, hover on either the “Themes” or “Plugins” menu sidebar and click on the “Add New” tab. Remember to “Network Enable” for theme installation and “Network Activate” for plugin installation – to make them available for all sites in the network if you desire.
Import Single Site Content
Navigate to that single site in your network dashboard via a hover on the “My Sites” top menu, select the website and click on “Dashboard”. Now, go to the “Tools” sidebar menu and click on the “Import” tab. Scroll through to see the WordPress title and click on “the main site”, then the “Install Now” link. After installation, click on the “Run Importer” link that appears to proceed. Further, click on the “Choose File” button to select the .xml file you already have on your computer and click on the “Upload file and import” button.
During importing, you can use already existing authors in your former site or assign new authors for the website page or post contents. Check the “Download and import file attachment” option if you still need the media files from your single site. Finally, click on the “Submit” button and see that all the log of files, pages and posts are available on the new website of your multisite network. Round off with making sure that your website looks as you like. Finally, take down the old/former single site or use the “301 redirects” for the new site in the network (to avoid hurting your search engine rankings).
How to Revert WordPress Multisite to Single Site?
Most of the hosting companies offer a checkbox to choose multisite setup when installing WordPress. Unfortunately, many users will select the checkbox to install multisite setup and then realize that is not they want. In addition, when a website in the network has become so large compared to other websites, you may want to move it to a stand-alone installation. You can migrate a site in the network or the whole multisite to a single website by following the below instructions.
Export Particular Website from Multisite
Head over to the dashboard of the site you wish to remove from the multisite. Hover on the “Tools” menu sidebar and click on the “Export” tab. Make a selection of the export options and click on the “Download Export File” button, the XML file that contains all that website data now resides or is available in your computer for later use.
Import Content of Multisite to Other Domain
As mentioned above, you can either use a new domain or a temporary domain to create a single site WordPress installation. After finishing your setup, login to the dashboard of the new site, then hover on the “Tools” sidebar menu and click on the “Import” tab. Scroll down to click the “Install Now” link below the WordPress title. This will install WordPress Importer plugin on your site and after the installation, click on the “Run Importer” link.
Click the “Choose File” button, select that site export file from your computer and click on the “Upload file and import” button. You can either change or leave the author assignment. Check the “Download and import file attachments” box for uploading the site media files and click on the “Submit” button. After successful import, you will see a saying, “Have Fun”. Now, you can check and start using the new single site.
Redirection Setup
The first thing in whichever case should be to run a backup in case if anything goes wrong within the process. Secondly, carry out a redirection after successful migrations to wrap it up. You can use Redirection plugin to create necessary 301 redirects to retain your search engine ranking of old pages. You can also use .htaccess directives to setup necessary redirects.
Using Redirection Plugin
Install and activate the plugin for that particular site you are migrating from your multisite network. You can setup redirects from subdomain to new domain with the following instructions.
- Go to the “Redirection” tab via the “Tools” menu.
- Switch to the “Site” tab to enter a domain name in “Redirect to domain” box and save settings by clicking on the “Update” button.
- This will redirect the entire site except WordPress login and admin pages.
- If needed, you can setup “Site Aliases” to redirect everything including login and admin pages.
Follow the below instructions for setting redirection from directory to a new domain.
Go to “Redirects” section, click the “Add New” button and fill the form that appears like below:
- Source URL: ^childsite/(.*)$
- Target URL: https://example.com/$1
- URL Options: Regex
- Finally, click on the “Add Redirect” button.
It will look like the below picture:
Add Redirects Via .htaccess
Add the below code in your .htaccess file for redirecting from subdomain to new domain in a multisite network.
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^subdomain.example.com$ [NC]
RewriteRule ^(.*)$ https://www.example.net/$1 [L,R=301]
Add the below code for redirecting from directory to a new domain.
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^childsite/(.*)$ https://example.net/$1 [R=301,L]
Note, remember to change the site instances such as childsite, subdomain.example.com and https://www.example.net to your own site name/URL.
Leave a Reply
Your email is safe with us.