If a migrated WordPress site still sends visitors to its old domain, first confirm the exact new address you want—including HTTPS, www or non-www, and any subdirectory—then trace the redirect through WordPress settings, configuration constants, plugins, server rules, and stored database references. Back up the site files and database before changing anything; the redirect may come from a layer other than WordPress’s two main URL settings.
Before changing anything: confirm the target and make a backup
Write down the full intended canonical URL, such as https://www.example.com or https://example.com/blog. The protocol, www choice, and any subdirectory matter. Confirm that the new domain points to the intended server and that you are editing the migrated WordPress installation—not a still-active copy on the old host.
| # | Preview | Product | Price | |
|---|---|---|---|---|
| 1 |
|
How to Migrate Your WordPress Site with WordPress Duplicator Plugin: Duplicator is a free and... | $7.00 | Buy on Amazon |
As an Amazon Associate I earn from qualifying purchases.
Back up the WordPress directory, including images, plugins, and other site files, as well as the database. Keep a separate backup immediately before URL or database edits so you can restore the migrated site if a change has unintended effects. WordPress’s migration handbook recommends backing up both files and database when moving servers.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Correct the WordPress Address and Site Address
WordPress keeps two related addresses: the WordPress Address (URL), where the core files are installed, and the Site Address (URL), the public address visitors use. In the dashboard, open Settings > General and check both. If the dashboard is unavailable, the corresponding database options are siteurl and home in the installation’s wp_options table. Set them to the correct full addresses for the migrated installation.
#1 Best Overall
With WP-CLI, inspect the current WordPress URL using:
wp option get siteurl
WP-CLI documents wp option update for changing an option; for example, after confirming the correct URL and database context:
wp option update siteurl 'https://example.com'
wp option update home 'https://example.com'
Substitute your actual canonical URL. Before running commands, make sure WP-CLI is operating on the migrated site and its intended database. WordPress’s migration instructions also describe updating home and siteurl when a site’s location changes.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Check configuration overrides in wp-config.php
If the database values look right but the redirect persists, inspect wp-config.php for WP_HOME and WP_SITEURL. If either constant is defined, verify its value against the intended site address. A configuration constant can override the database option, so changing only home and siteurl may not resolve a mismatch.
A WordPress support-thread participant reported resolving a redirect by defining both constants with the new URL, but that is one installation-specific outcome, not a universal remedy. Change or add constants only when you have confirmed they are appropriate for your setup; preserve a copy of the file before editing.
Trace redirects from plugins and the server
When WordPress’s URL options and configuration constants match the new address, investigate other redirect layers rather than repeatedly editing the same values.
- Redirect or migration plugins: Review active plugins and their redirect settings for a rule that sends the whole site—or a particular path—to the old domain.
- .htaccess: If the site uses Apache and this file is present, inspect its redirect and rewrite rules. Back it up before changing rules, and avoid removing unrelated WordPress or host configuration.
- Host or server configuration: Ask the hosting provider or developer to check server-level redirects if the rule is not in WordPress or
.htaccess. A redirect can be applied before WordPress handles the request.
A support response lists WordPress URL settings, plugin rules, .htaccess, and database configuration as possible sources, but the visible redirect alone does not identify which one is responsible. The relevant source varies by installation.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Replace old-domain references in the database safely
Even after the main site address is corrected, old-domain URLs may remain in content, theme settings, widgets, or other stored values. That can cause old links or media paths without necessarily being the cause of a site-wide redirect.
Do not run a naive text replacement across the entire database. WordPress warns that serialized data can store string lengths; changing a URL without updating those lengths may corrupt stored values. Use a WordPress-aware method such as WP-CLI search-replace or a suitable URL replacement plugin, and keep the database backup made before the change.
WP-CLI lets you preview the proposed changes with --dry-run:
wp search-replace 'http://oldsite.com' 'https://example.com' --dry-run
Replace both example addresses with the actual old and new URLs, using the correct protocol. Review the preview and its scope before applying anything. If the changes are appropriate, run the same command without --dry-run. WP-CLI documents this preview-and-run workflow in its search-replace command reference.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Refresh caches and rewrite rules when appropriate
After correcting the source, stale cached values or rewrite state may affect what you see. WP-CLI documents these commands:
wp cache flush
wp rewrite flush
The first flushes the object cache; the second refreshes rewrite rules. WordPress also notes in its migration handbook that transients can contain old address references and may be removed from a migrated database copy so they can be recreated. These steps can clear stale state, but they will not remove an active plugin or server redirect rule.
Verify the destination and narrow any remaining redirect
Test the homepage, a representative internal page, and the administrative entry points using the intended domain. Confirm that the browser finishes at the expected address, and check that images, links, and permalinks still work. WordPress’s migration guidance calls out permalink reconfiguration and media links as items to check when a site’s location changes.
- If every page redirects, recheck configuration constants, a site-wide plugin rule, and host/server redirects.
- If only one path redirects, inspect plugin and server rules that target that path, along with any old links stored for that content.
- If the browser reaches the new domain but individual links or images still point to the old one, investigate stored content and settings with a WordPress-aware replacement tool.
If the redirect remains after these checks, continue tracing the layer that issues it. Repeating broad database replacements will not fix a live redirect rule and can introduce database damage.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




