migration - Move a Wordpress multisite to subfolder (the whole site)?

admin2025-01-07  3

I'm not talking about subdomain/subfolder. I am talking about moving my whole Wordpress Multisite installation to example/ms/. And keeping the root for another non-multisite install of wordpress. I tried creating a folder /ms/ in the root. Moved everything there. Went to wp-config, changed to define('DOMAIN_CURRENT_SITE', 'example/ms'); Then went to phpmyadmin and changed every setting that had example to example/ms.

Still can't make it work?

How do I do a successful move?

I'm not talking about subdomain/subfolder. I am talking about moving my whole Wordpress Multisite installation to example.com/ms/. And keeping the root for another non-multisite install of wordpress. I tried creating a folder /ms/ in the root. Moved everything there. Went to wp-config, changed to define('DOMAIN_CURRENT_SITE', 'example.com/ms'); Then went to phpmyadmin and changed every setting that had example.com to example.com/ms.

Still can't make it work?

How do I do a successful move?

Share Improve this question asked Mar 14, 2018 at 8:14 jockebqjockebq 4631 gold badge6 silver badges17 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 0

Follow this steps:

you can move your multi-site root to ms folder Then

step 1: change the database url into options table for both site and all other url.

ex: example.com TO  example.com/ms/

step 2: DB wp_site table SET your domain name and path:

ex: domain :example.com
    PATH: /ms/

DB wp_blogs table SET your domain name and path for both site:

ex: domain :example.com
    PATH: /ms/
    PATH: /ms/your-newtwok-site-name/

step 3: httaces code and wp-config code comments for multi-site. only default code are reaming

step 4: Run your main site it's work after add this line into config.

define( 'WP_ALLOW_MULTISITE', true );

step 5: Login into admin and goto the tools menu. if it's display the message like your plugin disable then disable your plugin and get your new httaces and wp-config code for multi-site after that enable your plugin.

i am done my multi-site move to local to live. hope is work for you.

Note: Please backup your db and files.

A recent article on WPMU DEV explained this kind of migration.

As far as I understood from the conversation with Patel, you just miss the second part of Step 4 (single sites db tables).

Step 1

First and foremost, back up your Multisite installation.

Step 2

If you haven’t done so already, purchase that fancy new domain name for your network and associate it with the same web hosting account that your Multisite currently lives on.

Step 3

You’re going to need to edit the wp-config file in the root directory of your site. You can access this either through your File Manager or FTP. Once you’ve located the file, click on the Edit button to open it. Now, when you configured WordPress for Multisite, you added some code above this line:

/* That's all, stop editing! Happy blogging. */

The line you need want to update in this case is this one:

define('DOMAIN_CURRENT_SITE', 'yournetworkname.com');

Update “yournetworkname.com” with the new domain name you want to use. You then need to add the following two lines of code above the “That’s all, stop editing!” message:

define('WP_HOME','https://newnetworkdomain.com');
define('WP_SITEURL','https://newnetworkdomain.com');

Save your changes and exit.

Step 4

The database files for your Multisite now also need to change to reflect the new domain name of the network. Log into phpMyAdmin. From here, you’re going to need to search for your network’s database tables. Specifically, these are the ones that will require an update from the old domain name to the new one (these are all preceded by “wp_”):

blogs > domain
options > home
options > siteurl
site
sitemeta > siteurl

In addition, you also need to update the following tables for each of the sites that exist on the network. The pound sign (#) below is where you will see the actual site ID number.

#_options > siteurl
#_options > home
#_options > fileupload_url

Once you have renamed the domain in every instance in which it appears throughout your database tables, you can save your changes and close. Your site should now be fully migrated to the new domain name.

Step 5

Don’t forget to change the name of your site as well as the web address within WordPress.

https://premium.wpmudev.org/blog/help-i-need-to-migrate-a-wordpress-multisite-a-step-by-step-guide/

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736260205a648.html

最新回复(0)