search
HomeCMS TutorialWordPressRetargeting WordPress: Transferring Website from Multisite Network

Sometimes a site is already created in a WordPress multisite network but needs to be moved to its own single-site installation. There are several situations in which this may occur, including:

  • The site has grown too large to be included in the network.
  • This website needs its own IP address.
  • The website owner is changing providers or taking over full management of the website itself.

In some cases you may find that you can move a site out of multisite using a plugin or combination of plugins, but if this doesn't work you will need to move the relevant database tables. Moving a site out of a multisite network in this way is a tricky process because it involves isolating the database tables in the multisite database that are relevant to that specific site. But it's not impossible.

What do you need

To follow this tutorial you will need:

  • WordPress multisite installation with a subsite that you want to move to its own WordPress installation.
  • The second location you want to move your site to.

  • For manual moves, you will need an FTP client, a code editor, and access to phpMyAdmin.

Note: You cannot move the primary site out of a multisite network because the network will not workwithout it. If you do need to move your main site's content elsewhere, I recommend creating a copy and then replacing the original site's content with a dummy site. However, you won't be able to move the domain because it's also used by every other site in your network.

Use plugins to migrate sites out of multisite

If your website doesn’t have extensive configuration via plugins, themes, or website settings screens, you can successfully move it using the WordPress Importer plugin. If your website has widgets, you can copy their settings using the Widget Settings Importer/Exporter plugin.

However, if you added a lot of custom configurations using the settings or options screen or the theme customizer, none of these configurations will be copied. In this case, you need to move manually.

For full details on how to use these plugins to move your site, see my previous tutorial on moving a WordPress site using plugins. The process is exactly the same as moving a site from a multisite network to its own WordPress installation.

Manually migrate a site out of multisite

The site you are moving out of Multisite will contain three components that you need to copy from the Multisite network:

  • Theme and plugin files - you can copy these files or reinstall them in a new website
  • uploads — You can find these in the sites subdirectory at wp-content/uploads/sites
  • Database Tables - You don’t need all database tables, just the ones related to this website

Note: If your multisite network was created before WordPress 3.5, you will not have a sites folder. Instead, you will have a blogs.dir folder in wp-content that contains all the uploaded files for the subsite. This will give you a numbered folder for the site you want to migrate, which you can copy . I'll cover this in more detail below.

Do you really need a mobile website?

Before you begin, consider why you want to move your site. Is it just to change to a new domain name? If this is the case, then a free domain mapping plugin will allow you to give each site its own domain, and your visitors will never see the domain of your multisite network.

But if that’s not the only reason, keep reading!

Backup first

Before performing such operations, it is a good idea to back up your multisite installation. Use your favorite backup plugin, or if you prefer to work manually, use a combination of FTP and phpMyAdmin.

You will use this backup to copy relevant files to your new website and also give you peace of mind in case of any issues.

Find your site’s ID in a multisite network

Each site in a multisite network has its own unique numerical ID. This is used to identify folders in the wp-content/uploads/sites directory (or wp-content/blogs.dir if you have an older multisite network, see above ) and identify the site's database tables.

You can find this by going to Network Management > Sites and selecting the Edit option for the site you are using. The URL that WordPress directs you to will provide you with the ID of your website. The URL should be in the format http://mynetwork.com/wp-admin/network/site-info.php?id=XX.

XX is the ID of your site, and will be the name of the folder containing its files, and the prefix of its database table name.

p>

Export the table of the site from the network

Since you are only moving a subsite and not the entire installation, you do not need the contents of the entire database.

In PhpMyAdmin, click the Export tab. Then find the table related to the site you want to export. They will start with wp_XX_, where XX is your site's ID. An example is shown below.

重新定位 WordPress:从多站点网络传输网站

Select all tables related to your subsite and export them.

Note: WordPress Multisite stores all data related to web users in the wp_users and wp_usermeta tables: it does not create separate data for each site. If you have a lot of users on your site that you want to copy from the web, you may also want to export these tables, import them to the new site and edit the users in the admin screen to remove any non-existent users. Related to the new website. However, if your site only has one or two users, it will be easier to recreate the users on the new site. For more information about multisite and database tables, see our tutorial on WordPress databases and multisites.

Edit database table

Copy the sql file that was downloaded to your computer and give it a name (for example, add copy to its name). Open it in the code editor.

Change all instances of a site domain in a multi-site network to their new single-site domain. For example, if your site is at http://network.com/mysite, change it to http://mysite.com. If your network uses subdomains, you will need to change all instances of http://mysite.network.com. If you do this, I recommend you also run check subdirectory versions just in case. Save your file.

Note: If your site is mapped to a domain that is not the one you are moving it to, you will also need to replace it with the new domain. Be very careful here and keep backups!

Edit table reference

The database tables in a new single-site installation will not have the site ID prefixed, so you need to delete them. In the sql file, replace all instances of wp_XX_ with wp_, where XX is your site ID. p>

Now save the sql file.

Install WordPress and create the database in the new location

In phpMyAdmin, create a new database in the location of your new site and install WordPress in the normal way.

Upload files to new website

Identify the plugins used by the subsite and install them into your new WordPress site via the Plugins screen or upload them from your backup of the old site.

Do the same with any themes your site uses - copy them from the backup to the wp-content/themes directory of your new standalone WordPress installation, or just reinstall them.

Copy upload content from old website to new website:

  • If the network was created after WordPress 3.5, it will contain a sites folder in wp-content/uploads. Find the subfolder that contains your site ID and upload its contents to the wp-content/uploads folder in your new site.
  • If you are on an older network and have a blogs.dir folder, that folder will also contain a folder containing your website ID. There will then be a subfolder named files. Copy the contents of the files folder to the wp-content/uploads folder in the new website.

Note: You may need to delete any folders WordPress created in the new uploads folder to avoid any conflicts.

After completing all this, activate all themes and plugins.

Import the table into the new database

Now that you have the theme and plugin installed, you need to import the database tables.

Delete existing table

Before uploading the table from the old website, you need to delete the duplicate table that WordPress added to the new website.

In phpMyAdmin, delete the following tables from the database:

  • wp_commentmeta
  • wp_comments
  • wp_links
  • wp_options
  • wp_postmeta
  • wp_posts
  • wp_terms
  • wp_term_relationships
  • wp_term_taxonomy

Screenshot showing my database with only these tables selected:

重新定位 WordPress:从多站点网络传输网站

Select them, click the Select: drop-down box, and select Delete. When prompted, click Start.

Note: Do not delete the <em>wp_usermeta</em> or <em>wp_users</em> table , unless you also choose to copy these tables from the network (see above).

Upload database table

Next upload your edited database:

  • Click to import the tag.
  • Click the Select File button.
  • Select the sql file you have edited, and then click Select or Confirm.
  • Click the Start button.
  • After some time (depending on the size of the database), you will see a message telling you that the upload completed successfully.

Final Steps

Clear your browser's cache. This avoids any issues you might encounter if your browser has cached content from an older website.

Now log in as the WordPress administrator of the remote site. If you move the users table, your login details will be the same as on the old site, but if you didn't, these details will be what you specified when you installed WordPress in the new location.

Visit the Permalinks screen and reopen the beautiful permalinks.

Check that all your links are working properly and widgets and plugins are functioning as they should. If not, you can fall back on the process and use backups where needed, or just set up plugins and widgets in your new site.

Removing a site from a multisite network

Once you are completely satisfied that everything is working properly, remove the site from the multisite installation. I recommend leaving it on for a week or so in case you notice anything that hasn't been moved. In the meantime, you can use a plugin or configure the old site's domain in CPanel to map to the new site.

Yo! It's a long and slightly complicated process, but you're done.

Summary

Moving a site from WordPress Multisite to its own installation is not something that can be done quickly or thoroughly, but it is possible and I have done it a few times. If you follow the steps above and make sure you have a backup in case anything goes wrong, you should find that it goes smoothly for you.

The above is the detailed content of Retargeting WordPress: Transferring Website from Multisite Network. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
How to add a comment box to WordPressHow to add a comment box to WordPressApr 20, 2025 pm 12:15 PM

Enable comments on your WordPress website to provide visitors with a platform to participate in discussions and share feedback. To do this, follow these steps: Enable Comments: In the dashboard, navigate to Settings > Discussions, and select the Allow Comments check box. Create a comment form: In the editor, click Add Block and search for the Comments block to add it to the content. Custom Comment Form: Customize comment blocks by setting titles, labels, placeholders, and button text. Save changes: Click Update to save the comment box and add it to the page or article.

How to copy sub-sites from wordpressHow to copy sub-sites from wordpressApr 20, 2025 pm 12:12 PM

How to copy WordPress subsites? Steps: Create a sub-site in the main site. Cloning the sub-site in the main site. Import the clone into the target location. Update the domain name (optional). Separate plugins and themes.

How to write a header of a wordpressHow to write a header of a wordpressApr 20, 2025 pm 12:09 PM

The steps to create a custom header in WordPress are as follows: Edit the theme file "header.php". Add your website name and description. Create a navigation menu. Add a search bar. Save changes and view your custom header.

How to display wordpress commentsHow to display wordpress commentsApr 20, 2025 pm 12:06 PM

Enable comments in WordPress website: 1. Log in to the admin panel, go to "Settings" - "Discussions", and check "Allow comments"; 2. Select a location to display comments; 3. Customize comments; 4. Manage comments, approve, reject or delete; 5. Use <?php comments_template(); ?> tags to display comments; 6. Enable nested comments; 7. Adjust comment shape; 8. Use plugins and verification codes to prevent spam comments; 9. Encourage users to use Gravatar avatar; 10. Create comments to refer to

How to upload source code for wordpressHow to upload source code for wordpressApr 20, 2025 pm 12:03 PM

You can install the FTP plug-in through WordPress, configure the FTP connection, and then upload the source code using the file manager. The steps include: installing the FTP plug-in, configuring the connection, browsing the upload location, uploading files, and checking that the upload is successful.

How to copy wordpress codeHow to copy wordpress codeApr 20, 2025 pm 12:00 PM

How to copy WordPress code? Copy from the admin interface: Log in to the WordPress website, navigate to the destination, select the code and press Ctrl C (Windows)/Command C (Mac) to copy the code. Copy from a file: Connect to the server using SSH or FTP, navigate to the theme or plug-in file, select the code and press Ctrl C (Windows)/Command C (Mac) to copy the code.

What to do if there is an error in wordpressWhat to do if there is an error in wordpressApr 20, 2025 am 11:57 AM

WordPress Error Resolution Guide: 500 Internal Server Error: Disable the plug-in or check the server error log. 404 Page not found: Check permalink and make sure the page link is correct. White Screen of Death: Increase the server PHP memory limit. Database connection error: Check the database server status and WordPress configuration. Other tips: enable debug mode, check error logs, and seek support. Prevent errors: regularly update WordPress, install only necessary plugins, regularly back up your website, and optimize website performance.

How to close comments with wordpressHow to close comments with wordpressApr 20, 2025 am 11:54 AM

How to turn off a comment in WordPress? Specific article or page: Uncheck Allow comments under Discussion in the editor. Whole website: Uncheck "Allow comments" in "Settings" -> "Discussion". Using plug-ins: Install plug-ins such as Disable Comments to disable comments. Edit the topic file: Remove the comment form by editing the comments.php file. Custom code: Use the add_filter() function to disable comments.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version