Hi Friends, In this article I am going to explain you how you can move WordPress Multisite to New Domain. for example if you have a domain xyz.com and you want to move it to domain abc.com then this article will surely help you. These days due to develop site on development server or due to SEO purpose or may be due to unavailability of your favorite domain names many users want to change domain names when their favourite domain available or want to shift site to production server domain So at that time user need to move WordPress multisite to new domain or another domain.
I will write how you can move WordPress Multisite from one domain to another :
1. First Step is always take backup of site files and database. If something goes wrong then we can restore all backup and make website running up.
2. Now transfer all files to new domain root path or wherever you want to move and also import database to new server by using phpmyadmin.
3. Open wp-config.php file on new server which will be in your root folder and then update database connection variables with new ones.
4. In wp-config.php also change these fields : in below code “new-domain.com” should be replaced by your new server domain name and $base and “PATH_CURRENT_SITE” should be set according to your WordPress installation directory.
$base = '/'; define( 'DOMAIN_CURRENT_SITE', 'new-domain.com' ); define( 'PATH_CURRENT_SITE', '/' );
5. Now open .htaccess file and confirm : RewriteBase / , if your new domain have all WordPress files in root then it should be like this : RewriteBase /
6. Now login to phpmyadmin.
7. Go to ‘wp_options’ table and change ‘site_url’ and ‘home’ fields to your new domain name, alternatively you can do this by below SQL query :
UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl';
8. Go to ‘wp_blogs’ table and adjust/change domain and all paths for all entries, Be sure that not a single entry have old domain path in it.
9. Go to ‘wp_site’ table and adjust/change domain and all paths for all entries, Be sure that not a single entry have old domain path in it.
10. Go to ‘wp_sitemeta’ and change the field ‘site_url’ with new domain name.
11. Now WordPress Multisite make WordPress tables for each blog by adding a incremented prefix like wp_1_ , wp_2_ , wp_3_ … So need to open each wp_*_options table and change ‘site_url’ and ‘home’ to new domain name.
12. Now take backup of database because we are going to run one query which can create issues, So better is we take backup So we don’t have to do all steps again.
13. Run SQL query to update GUID for each of blogs incrementing the table as before :
UPDATE wp_posts SET guid = REPLACE (guid,'http://old-domain.com','http://new-domain.com');
14. Repeat step no 13 but this time instead of ‘guid’ we will use ‘post_content’.
UPDATE wp_posts SET post_content = REPLACE (post_content,'http://old-domain.com','http://new-domain.com');
15. So that’s it, Please check your site. If you made all things properly then I your site should run properly, If you have any issues then let me know in comments, I would be happy to help you!
I am available to hire to do this process of move WordPress Multisite to new domain , So If you are interested to hire me then You can contact me.
I am PHP Freelancer, Hire PHP Developer India and PHP Freelancer India. If you have any projects related to WordPress or PHP you can contact me.