clare485
9/6/2017 - 10:54 AM

how-to-change-url-for-multisite

https://premium.wpmudev.org/forums/topic/how-to-change-url-for-wp-multi-site?utm_e

Mark, I'm sorry, I'm not sure how I missed that last bit about Multisite. Thanks for following up with me on this. I'm sure that was a confusing answer.

Further down on that page I linked before there's a section on "Moving Multisite" They provide a script to automate alot of this, but with yours being so small and only having one site, it might be easier to do it manually.

Ok, here's how this works. There are a few database changes to make. I'd recommend doing this from within phpMyAdmin.

I'd recommend doing a full database backup before getting started.

1. Table wp_options: Change "siteurl" and "home" to the new URL. Be sure to include the "http://" prefix and the trailing slash "/" (2 screenshots)

2. Table wp_sitemeta: Similar to wp_options, there's a "siteurl" field you'll need to change here. Do include the "http://" and the trailing slash

3. Table wp_site: Change the only value here to your new domain. Don't include http:// here. This is the domain only (1 screenshot)

4. Table wp_blogs: Each subsite will have an entry here. You'll need to update the domain column for each row, (similar to what you did in the previous step) This column is for the domain only, not the URL, so no "http://" this time.

5. For each wp_{blog_id}_options table. Every blog will have it's own options table created. You'll need to update it just like in step one. That would mean the "siteurl" and "home" fields.

6. Finally, you'll need to update your wp-config.php file:
define( 'DOMAIN_CURRENT_SITE', 'newdomain.com' );

And that should do it. Let me know if you run into any trouble!