Move a multisite WordPress to your local XAMPP

First you should copy files to your XAMPP htddocs folder. And then import database sql file by phpmyadmin.

As the domains name changed so you need make sure them updated to suite your local environment.

Step 1: Change siteurl and home option with your local domain name in wp_options table

You may use sql such as:

{code type=php}
UPDATE wp_options SET option_value = 'http://localhost/bill-myblogs' WHERE wp_options.option_name LIKE 'siteurl';
UPDATE wp_options SET option_value = 'http://localhost/bill-myblogs' WHERE wp_options.option_name = LIKE 'home';
{/code}

Step 2: Change domain in wp_site table

{code type=php}
UPDATE wp_site SET domain = 'localhost/bill-myblogs' WHERE wp_site.id = 1;
{/code}

Step 3: Change siteurl in wp_sitemeta table

{code type=php}
UPDATE wp_sitemeta SET meta_value = 'http://localhost/bill-myblogs' WHERE wp_sitemeta.meta_key = 'siteurl';
{/code}

Step 4: wp_blogs: any entries in the "domains" column that have the old domain name

{code type=php}
UPDATE mur_blogs SET domain= 'localhost/bill-myblogs'
{/code}

Step 5: Change siteurl and home option in wp_#options
Each sub-site will have sets of tables that correspond to the blog_id in the wp_blogs table. You need to go to the wp
#_options table, where # corresponds to the blog_id, and update the “siteurl” and “home” settings in that table.

{code type=php}
UPDATE wp_3_options SET option_value = 'http://localhost/bill-myblogs/ycfunderwaterhockey' WHERE wp_3_options.option_name LIKE 'siteurl';
UPDATE wp_3_options SET option_value = 'http://localhost/bill-myblogs/ycfunderwaterhockey' WHERE wp_3_options.option_name LIKE 'home';
{/code}

{code type=php}
UPDATE wp_6_options SET option_value = 'http://localhost/bill-myblogs/luckyslakeswimblog' WHERE wp_6_options.option_name LIKE 'siteurl';
UPDATE wp_6_options SET option_value = 'http://localhost/bill-myblogs/luckyslakeswimblog' WHERE wp_6_options.option_name LIKE 'home';
{/code}

define('DOMAIN_CURRENT_SITE', 'localhost');
define('PATH_CURRENT_SITE', '/luckyslakeswim-net/');

==============
.htaccess

RewriteEngine On
RewriteBase /luckyslakeswim-net/
RewriteRule ^index.php$ - [L]

add a trailing slash to /wp-admin

RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.
.php)$ $2 [L]
RewriteRule . index.php [L]


Posted from my blog with SteemPress : https://waytowp.com/move-a-multisite-wordpress-to-your-local-xampp/

Sort:  

Thank you for your contribution. Below is our feedback.

  • Tutorials are meant to be well explanatory. Your tutorial lacked this aspect as it merely contained portions of code.
  • Your code blocks are surrounded by {code type=php} references, although that's not PHP you're using here.
  • You did not explain many of the steps you implemented.
  • There is no clear reference to what bill-myblogs is, nor to why you used site.id = 1, as well as wp_3_options and wp_6_options
  • For the future, try to include more details, more steps, screenshots of the outcome of whatever action you include in your tutorial, and work on improving the overall approach to your tutorials.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you for your review, @mcfarhat! Keep up the good work!

Hi @ascending.taurus!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Congratulations @ascending.taurus! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You received more than 50 upvotes. Your next target is to reach 100 upvotes.

Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word STOP

You can upvote this notification to help all Steemit users. Learn why here!

Hey, @ascending.taurus!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!