Moving your WordPress site to a new domain is a significant operation that, if done incorrectly, can destroy your search engine rankings and break your site. Whether you are rebranding, switching from a .com to a .co.tz domain, or consolidating multiple sites, this guide provides a step-by-step process to migrate your WordPress site to a new domain while preserving your SEO value. All instructions are tailored for SakuraHost customers.
Before You Start
Pre-Migration Checklist
- New domain registered and pointing to your SakuraHost nameservers
- SSL certificate issued for the new domain (SakuraHost provides free AutoSSL)
- Full backup of files and database completed
- Access to Google Search Console for both old and new domains
- List of all external services using your old domain (Google Analytics, social media profiles, business directories, email services)
Step 1: Create a Complete Backup
Use UpdraftPlus or cPanel Backup to create a full backup of your WordPress files and database. Download copies to your local computer. This is your safety net if anything goes wrong.
Step 2: Set Up the New Domain
- Add the new domain to your SakuraHost cPanel as an Addon Domain or set it as the primary domain
- Ensure DNS A records point to your server IP
- Wait for DNS propagation (typically 1-24 hours, use dnschecker.org to verify)
- Issue an SSL certificate via cPanel > SSL/TLS Status
Step 3: Copy WordPress Files
If the new domain is on the same server, copy the entire WordPress directory to the new domain's document root via File Manager or SSH:
If moving to a different server, upload the backup files to the new location.
Step 4: Export and Import the Database
- Export the database via phpMyAdmin (cPanel > phpMyAdmin > Export)
- Create a new database for the new domain in cPanel > MySQL Databases
- Import the exported SQL file into the new database via phpMyAdmin > Import
- Update
wp-config.phpin the new domain's directory with the new database name, username, and password
Step 5: Search and Replace the Domain
This is the most critical step. WordPress stores the full domain URL in dozens of places in the database, including serialized data that a simple SQL REPLACE cannot handle correctly.
Temporarily update wp-config.php to point to the new domain:
Install Better Search Replace. Go to Tools > Better Search Replace and replace olddomain.co.tz with newdomain.co.tz. Run a dry run first to preview changes, then execute.
If you have SSH access:
Also run for the HTTPS variant if your old site used HTTP:
Step 6: Set Up 301 Redirects
301 redirects tell search engines that your content has permanently moved to the new domain. This transfers approximately 90-99% of your SEO value.
This redirects every URL on the old domain to the same path on the new domain, preserving URL structure.
Step 7: Update Google Search Console
- Add and verify the new domain in Google Search Console
- In the old domain's property, go to Settings > Change of Address
- Select the new domain and submit
- Submit the XML sitemap for the new domain
Step 8: Update External References
- Google Analytics: Update the property's default URL in Admin > Property Settings
- Google Business Profile: Update your website URL
- Social Media: Update website links on Facebook, Instagram, Twitter, and LinkedIn
- Business Directories: Update your listing on Tanzania-specific directories
- Email Signatures: Update any email signatures referencing the old domain
- Printed Materials: Plan to update business cards, brochures, and other materials
Step 9: Monitor and Verify
- Test all pages on the new domain for broken links using Broken Link Checker or an online tool like Dead Link Checker
- Verify 301 redirects are working by visiting old domain URLs and confirming they redirect to the new domain
- Check Google Search Console for crawl errors on the new domain
- Monitor organic search traffic in Google Analytics for the following 4-6 weeks
- Ensure all images and media files load correctly (no mixed content warnings)
How Long to Maintain 301 Redirects
Keep your 301 redirects active for at least 12 months, ideally permanently. This ensures that any bookmarks, external links, or cached search results pointing to your old domain continue to reach your content. The old domain must remain registered and hosted during this period.
For Google's official guidance on site moves, see the Google Search documentation on site moves.