How to move a WordPress Multisite from local to Web Server

How to move a WordPress Multisite from local to Web Server.

Recently I am working on WordPress Mu (multi site). I install wordpress set up on my local server (xampp) and enables the multi site option from wp-config file by adding the following code.


define(‘WP_ALLOW_MULTISITE’, true);

define(‘MULTISITE’, true);

define(‘SUBDOMAIN_INSTALL’, false);

define(‘DOMAIN_CURRENT_SITE’, ‘’); // replace by you domain name

define(‘SITE_ID_CURRENT_SITE’, 1);

define(‘BLOG_ID_CURRENT_SITE’, 1);


After that we need to move the developed MU site on the web server. To move MU site from local to web server we need to follow some steps.

1- First of all upload the site zip file on the server and the extract all the files the server.
2- Export the database sql from local nad then upload it on the server.
3- Edit your wp-config file, change the database connection credentials i.e. database username, password and its name. And change the MU options. Replace your domain name.

define(‘DOMAIN_CURRENT_SITE’, ‘’); // replace by you domain name do not use http:// before domain name


After the above steps you need to make some changes in the database of the site.

1- In ‘wp_options’ updated the ‘siteurl’ and ‘home’ fields with your domain name
2- In ‘wp_blogs’ all of the paths were updated with your domain name (only the ones that had the localhost in them to begin with)
3- In ‘wp_site’ changed the domain and path to reflect.
4- In ‘wp_sitemeta’ updated the ‘siteurl’.
5- Update all the sub site options table. (e.g. wp_1_options, wp_2_options, wp_3_options etc.)

Make sure all of the content points to your domain name not your localserver path. To ensure about this exceute the bewlow queries


UPDATE wp_posts SET post_content=REPLACE(post_content, ‘’, ‘’)

UPDATE wp_posts SET guid=REPLACE(guid, ‘’, ‘’)


Author: Dheeraj Dhawan

I'm a web developer / PHP programmer. I am also working on custom plugin development of wordpress.

One thought on “How to move a WordPress Multisite from local to Web Server”

Leave a Reply

Your email address will not be published. Required fields are marked *