Retargeting 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.
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.
Edit link
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 inwp-content/uploads
. Find the subfolder that contains your site ID and upload its contents to thewp-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 namedfiles
. Copy the contents of thefiles
folder to thewp-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:
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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



WordPress is easy for beginners to get started. 1. After logging into the background, the user interface is intuitive and the simple dashboard provides all the necessary function links. 2. Basic operations include creating and editing content. The WYSIWYG editor simplifies content creation. 3. Beginners can expand website functions through plug-ins and themes, and the learning curve exists but can be mastered through practice.

Blogs are the ideal platform for people to express their opinions, opinions and opinions online. Many newbies are eager to build their own website but are hesitant to worry about technical barriers or cost issues. However, as the platform continues to evolve to meet the capabilities and needs of beginners, it is now starting to become easier than ever. This article will guide you step by step how to build a WordPress blog, from theme selection to using plugins to improve security and performance, helping you create your own website easily. Choose a blog topic and direction Before purchasing a domain name or registering a host, it is best to identify the topics you plan to cover. Personal websites can revolve around travel, cooking, product reviews, music or any hobby that sparks your interests. Focusing on areas you are truly interested in can encourage continuous writing

WordPressisgoodforvirtuallyanywebprojectduetoitsversatilityasaCMS.Itexcelsin:1)user-friendliness,allowingeasywebsitesetup;2)flexibilityandcustomizationwithnumerousthemesandplugins;3)SEOoptimization;and4)strongcommunitysupport,thoughusersmustmanageper

Can learn WordPress within three days. 1. Master basic knowledge, such as themes, plug-ins, etc. 2. Understand the core functions, including installation and working principles. 3. Learn basic and advanced usage through examples. 4. Understand debugging techniques and performance optimization suggestions.

WordPress itself is free, but it costs extra to use: 1. WordPress.com offers a package ranging from free to paid, with prices ranging from a few dollars per month to dozens of dollars; 2. WordPress.org requires purchasing a domain name (10-20 US dollars per year) and hosting services (5-50 US dollars per month); 3. Most plug-ins and themes are free, and the paid price ranges from tens to hundreds of dollars; by choosing the right hosting service, using plug-ins and themes reasonably, and regularly maintaining and optimizing, the cost of WordPress can be effectively controlled and optimized.

Wix is suitable for users who have no programming experience, and WordPress is suitable for users who want more control and expansion capabilities. 1) Wix provides drag-and-drop editors and rich templates, making it easy to quickly build a website. 2) As an open source CMS, WordPress has a huge community and plug-in ecosystem, supporting in-depth customization and expansion.

The core version of WordPress is free, but other fees may be incurred during use. 1. Domain names and hosting services require payment. 2. Advanced themes and plug-ins may be charged. 3. Professional services and advanced features may be charged.

People choose to use WordPress because of its power and flexibility. 1) WordPress is an open source CMS with strong ease of use and scalability, suitable for various website needs. 2) It has rich themes and plugins, a huge ecosystem and strong community support. 3) The working principle of WordPress is based on themes, plug-ins and core functions, and uses PHP and MySQL to process data, and supports performance optimization.
