What this problem looks like
WordPress stores the site address in wp_options and embeds URLs inside post content, meta, and widget data. A domain change needs both settings updated and a careful database replace.
Never use plain SQL REPLACE on the whole database when plugins store serialized PHP arrays. Length changes corrupt serialized data.
Change URL in wp-admin
- Settings → General.
- Update WordPress Address and Site Address to the new URL.
- Save. You may need to log in again at the new URL.
Lock URLs in wp-config.php
Constants override the database and help when Settings screen is unreachable during migration.
define( 'WP_HOME', 'https://newdomain.co.uk' );
define( 'WP_SITEURL', 'https://newdomain.co.uk' );
Search-replace with WP-CLI
wp search-replace 'https://olddomain.co.uk' 'https://newdomain.co.uk' --all-tables --precise
wp search-replace 'https://olddomain.co.uk' 'https://newdomain.co.uk' --network --url=olddomain.co.uk
Update .htaccess and redirects
Add 301 redirects from the old domain on the old host so SEO and bookmarks survive.
Update Google Search Console and analytics properties after cutover.
Common problems after URL change
- Login redirect loop: cookie domain or http/https mismatch.
- Mixed content: hardcoded http assets in posts.
- Broken media: uploads URL still pointing at old CDN.
When to stop DIY and hire help
Domain moves on WooCommerce and multisite need serialized-safe replaces and checkout testing. BugShield migration service handles URL changes at a confirmed UK price.