{"id":2255,"date":"2017-12-25T14:16:26","date_gmt":"2017-12-25T08:46:26","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=2255"},"modified":"2026-09-14T17:16:53","modified_gmt":"2026-09-14T11:46:53","slug":"changing-domain-name-wordpress-multi-site","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/changing-domain-name-wordpress-multi-site\/","title":{"rendered":"Changing the Domain Name in WordPress Multisite"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This document explains how to update the site URL when moving a WordPress Multisite installation from an old domain to a new domain. The process includes updating the primary domain in <code>wp-config.php<\/code> and replacing the old domain references in the WordPress database.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Ensure you have a complete backup of the WordPress files and database. Ensure you have access to the WordPress server <code>wp-config.php<\/code>. Ensure you have MySQL\/phpMyAdmin access with appropriate database permissions. Confirm that the new domain is configured and pointing to the correct server. Identify the correct WordPress database and table prefixes before running SQL queries. Verify the old and new domain names carefully before performing the replacement. If the site uses SSL, ensure the new domain has a valid SSL certificate.<\/p>\n\n\n<h2>Implementation<\/h2>\n<p>In this post, we will explain how to change the site URL on the newly moved domain.<\/p>\n<p>Step 1: Open the wp-config.php and edit define(&#8216;DOMAIN_CURRENT_SITE&#8217;, &#8216;newdomain.com&#8217;);<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">define('WP_DEBUG', false);\ndefine('WP_ALLOW_MULTISITE', true);\ndefine('MULTISITE', true);\ndefine('SUBDOMAIN_INSTALL', false);\ndefine('DOMAIN_CURRENT_SITE', 'newdomain.com');\ndefine('PATH_CURRENT_SITE', '\/');\ndefine('SITE_ID_CURRENT_SITE', 1);\ndefine('BLOG_ID_CURRENT_SITE', 1);<\/pre>\n<p>Step 2: Open MySQL or phpMyAdmin and run the following query.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">UPDATE wp_options SET option_value = replace(option_value, 'http:\/\/olddomain.com', http:\/\/newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl';\n\nUPDATE tmp6d400b_posts SET guid = replace(guid, 'http:\/\/olddomain.com','http:\/\/newdomain.com');\n\nUPDATE tmp6d400b_posts SET post_content = replace(post_content, 'http:\/\/olddomain.com', http:\/\/newdomain.com');\n\nUPDATE wp_postmeta SET meta_value = replace(meta_value,'http:\/\/olddomain.com','http:\/\/newdomain.com');\n\nUPDATE wp_site domain='http:\/\/newdomain.com' where id=value\n\nUPDATE wp_blogs SET domain='http:\/\/newdomain.com' WHERE blog_id=value;<\/pre>\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">After updating <code>wp-config.php<\/code> and the required database entries, the WordPress Multisite installation will use the new domain. Clear the WordPress\/server cache and verify the main site, network admin, and individual sites to ensure they are loading correctly. It is recommended to test all site URLs and functionality after the domain migration.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">FAQs<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. Why do we need to update <code>DOMAIN_CURRENT_SITE<\/code>?<\/strong><br>It tells WordPress Multisite the primary domain used by the network.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2. Why should we take a database backup first?<\/strong><br>The SQL queries modify multiple database tables. A backup allows the database to be restored if an incorrect replacement is performed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>3. Do I need to update the domain in the database?<\/strong><br>Yes. WordPress Multisite stores domain information in several tables, including <code>wp_site<\/code>, <code>wp_blogs<\/code>, and site-specific tables.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Related Articles<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wordpress-multisite-domain-setup\/\">WordPress Multisite Setup and Domain Mapping<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Talk to our experts<strong>:<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Looking for the right technology solution for your business?. Our experts can help with\u00a0web hosting, domain registration, DevOps and cloud, software development, web applications, mobile applications, and enterprise solutions. Get in touch with our team <a href=\"https:\/\/pheonixsolutions.com\/contact\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction This document explains how to update the site URL when moving a WordPress Multisite installation from an old domain [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1022],"tags":[273,167],"class_list":["post-2255","post","type-post","status-publish","format-standard","hentry","category-web-architecture","tag-php","tag-wordpress-2","psol-cat-web-architecture"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-An","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=2255"}],"version-history":[{"count":1,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2255\/revisions"}],"predecessor-version":[{"id":11764,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2255\/revisions\/11764"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=2255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=2255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=2255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}