WordPress Multisite Change Main Site: A 15-Minute Step-by-Step Guide
Bulletproof Backups for Your WordPress Website
Fortify your business continuity with foolproof WordPress backups. No data loss, no downtime — just secure, seamless operation.

Your WordPress multisite network has grown, but what happens when the main site no longer fits? It’s a frustrating spot to be in, especially when you realize there’s no official setting for this. We understand the challenge completely.
That’s why we’ve laid out two methods for a successful WordPress multisite change main site process.
Let’s update your network’s foundation to match your new reality, safely.
TL;DR: Changing your multisite’s main site involves editing the wp-config.php file and running a careful database search-and-replace. Before you begin, always create a complete and verified copy of your entire network using a trusted backup plugin.
Prerequisites: Non-negotiable preparation
Before you touch a single file, we need to get everything in order. Skipping these steps is not an option if you want a safe and successful outcome.
Secure a complete, verified WordPress backup. You need a full backup of your database and all your WordPress files. More importantly, you must test this backup by restoring it in a safe environment. An untested backup is just a hope. A verified backup is your undo button.
Replicate your network in a staging environment. Never perform this procedure on your live site first. Duplicate your entire network to a staging or development server. This is your sandbox. You can test, validate, and fix any mistakes here without any real-world consequences.
Gather critical site information. You’ll need the blog_id of the site you plan to promote. We’re using the Cloudways Database Manager for this guide, but the process is identical in any database manager. Just open the wp_blogs table to find the ID.
Prepare your database tools. A simple find-and-replace will corrupt your database. Use a specialized tool like the Better Search Replace plugin to do this safely.
WordPress Multisite change main site
With your preparation handled, you have two clear paths forward. The one you choose depends entirely on your goal.
1) Promoting a subsite to a primary site
This is the most common situation. You have an existing subsite, like one with blog_id 3, and you want it to be the new front door for your entire network.
Modify the constants in your wp-config.php file. This is the first step in telling WordPress about the change. Locate these constants and update them to reflect your new main site.
define('DOMAIN_CURRENT_SITE', 'newprimarydomain.com');
define('BLOG_ID_CURRENT_SITE', 3);
Update the core network database tables. Next, we need to update the network’s main records directly. Using a tool like phpMyAdmin or Adminer, you’ll make two precise changes. This is exactly why you have that full site backup ready. Be careful here, as you are editing fundamental tables.
Set the network’s new main address. Go into the wp_site table and change the domain to your new primary domain (newprimarydomain.com).
Make your subsite the new “front door.” Open the wp_blogs table, find the row for your chosen site (e.g., blog_id 3), and set its domain to newprimarydomain.com.
Retire the old main site’s domain. In that same wp_blogs table, find the original site (blog_id 1) and change its domain to something unique, like example-root.yournetwork.com. This step is crucial to avoid any conflicts.
Execute a network-wide search and replace. This is the final and most important step. Use your prepared tool to replace every instance of the old primary domain with newprimarydomain.com across all database tables. This corrects every stored URL in your content, settings, and media paths.
2) Changing the domain of the existing root site
This approach is for a simpler scenario. You are keeping blog_id 1 as your main site, but you’re changing its domain. This is common when moving a site from a development URL to its final production address.
Modify the wp-config.php file. You only need to update the domain itself. The blog ID for the main site remains 1.
define('DOMAIN_CURRENT_SITE', 'newproductiondomain.com');
// BLOG_ID_CURRENT_SITE remains 1
Update specific database tables. The new domain (newproductiondomain.com) needs to be changed in these five specific locations.
Execute a network-wide search and replace. Just like in the first method, run a full, serialization-safe search and replace to update all instances of the old domain to the new one.
Post-change verification protocol
Once the technical work is done, you must verify that it actually worked. This checklist will confirm the health of your network.
Best practices for a stable transition
These final steps ensure your network remains healthy and stable for the long term.
Parting thoughts
For most situations, the first option is the correct solution. It properly changes the network’s functional main site without trying to rewire its core structure.
However, this is an advanced procedure. It carries inherent risk because it affects your entire network. The process covers everything from creating a backup to the final verification. If any step is outside your technical confidence, we strongly recommend engaging a professional. This is a necessary and prudent investment to safeguard your network’s stability.
FAQs
How do I change the main site in WordPress?
To change the main site in a multisite network, you must edit the wp-config.php file and update specific domain entries in the database. This process reassigns which site acts as the network’s primary root.
How to change site URL in WordPress multisite?
You can change a subsite’s URL directly from the Network Admin dashboard by going to “Sites,” selecting “Edit,” and updating the “Site Address (URL)” field. After saving, you may need a search-and-replace tool to fix URLs embedded in content.
Why is my WordPress site redirecting to another site?
A WordPress site typically redirects due to an incorrect URL in your settings, a misconfigured plugin, or malicious code. Check your .htaccess file and wp-config.php file for unexpected rules or definitions.
How to manage multiple sites with WordPress?
You can manage multiple sites by activating the built-in WordPress Multisite feature, which runs a network of sites from a single installation. Alternatively, management tools like WP Remote let you control completely separate WordPress sites from one central dashboard.
Tags:
Share it:
You may also like
-
WordPress Autosave: How It Works, How To Recover Work, And When To Change It
Lost work makes autosave feel urgent fast. Maybe your browser froze. Maybe the tab closed. Maybe you reopened a post and saw content that looked older than the version you…
-
WordPress Revisions 101: Find, Restore, and Manage Old Versions Safely
You’ve probably landed here because WordPress changed on you and your stomach dropped a little. A paragraph is gone. A page looked better yesterday. Someone on the team clicked Update,…
-
How to Manually Update WordPress Plugin Safely: The Ultimate Beginner’s Guide
If you need to manually update WordPress plugin files, something has probably already made you pause. Maybe the automatic update failed. Maybe a premium plugin gave you a ZIP file…
How do you update and backup your website?
Creating Backup and Updating website can be time consuming and error-prone. BlogVault will save you hours everyday while providing you complete peace of mind.
Updating Everything Manually?
But it’s too time consuming, complicated and stops you from achieving your full potential. You don’t want to put your business at risk with inefficient management.
Backup Your WordPress Site
Install the plugin on your website, let it sync and you’re done. Get automated, scheduled backups for your critical site data, and make sure your website never experiences downtime again.