Skip to content

Instantly share code, notes, and snippets.

@davemac
Created June 28, 2018 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davemac/05cbeace49eae6c73ac46e0312458675 to your computer and use it in GitHub Desktop.
Save davemac/05cbeace49eae6c73ac46e0312458675 to your computer and use it in GitHub Desktop.
wpmu change site domain
# If the sub site's site/home url can not be changed from the WP admin, the following SQL
# queries will change the necessary fields to map a domain to a sub site.
# presuming the sub site ID that we are changing is 1…
UPDATE `wp_blogs` SET domain='smsmagazine.com.au', path='/' WHERE blog_id = 1;
UPDATE `wp_options` SET option_value='https://smsmagazine.com.au/' WHERE option_name='siteurl';
UPDATE `wp_options` SET option_value='https://smsmagazine.com.au/' WHERE option_name='home';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment