Changing your WordPress URL or moving your site to a new domain seems simple—but you might have experienced your WordPress site broken after changing URL, because it’s one of the easiest ways to break a WordPress installation. Suddenly, pages won’t load, the dashboard becomes unreachable, and the site may loop between redirects.
This happens because WordPress stores your site’s URL in multiple places: the database, core settings, theme files, and sometimes hard‑coded links. When those values don’t match, WordPress doesn’t know where your site actually lives.
The good news: this issue is extremely common and 100% fixable with the steps below.
Common Causes Behind a WordPress Site Broken After Changing URL
Here are the most frequent reasons for experiencing the issue of a WordPress Site Broken After Changing URL
- Incorrect Site Address (URL) in WordPress settings
WordPress relies on two critical settings: WordPress Address (URL) and Site Address (URL). If either is mistyped or doesn’t match your new domain, WordPress won’t know where your site lives. This often causes login loops, missing styles, or the entire site not loading.
- The old URL is still stored in your database
WordPress saves URLs in many places—posts, pages, widgets, menus, plugin settings, and more. After a URL change, if these still point to the old domain, parts of your site may break, such as images not loading or links redirecting incorrectly.
- wp-config.php overrides the URL
Sometimes developers hard‑code the site URL directly in the wp-config.php file using constants like WP_HOME and WP_SITEURL. If these are still set to the old domain, WordPress will ignore the new settings in the dashboard and force the site to use the outdated URL.
- .htaccess rules causing redirect loops
The .htaccess file controls how URLs are rewritten and redirected. If it contains redirects to the old domain—or conflicting rules—it can cause endless loops, making the site appear inaccessible.
- Hard‑coded old URLs in theme files or plugins
Some themes or plugins include absolute links written directly in the code instead of using WordPress functions. If the old domain is embedded in those files, parts of your site may still load content from the wrong place or break entirely.
- Mixed-content issues (HTTP to HTTPS)
If you switched from http to https, your browser may block insecure resources—such as images, scripts, or styles—still being loaded from http. This causes partial loading, broken layouts, or security warnings.
- Caching or CDN is still pointing to the old domain
Caches store old versions of your site, and CDNs may still be delivering assets from the previous URL. Until those are cleared or updated, your site may appear incorrect, broken, or inconsistent.
Step-by-Step Fixes to Restore Your WordPress Site

1. Update the WordPress Address and Site Address
If you can access your admin dashboard:
- Log in to WordPress.
- Go to Settings → General.
- Update:
• WordPress Address (URL)
• Site Address (URL) - Save changes.
- Refresh your browser and clear the cache.
If the site is broken and you can’t access the dashboard, skip to the next steps.
2. Fix the URL directly in the Database (phpMyAdmin)
Use this method when your admin area is inaccessible.
- Log in to your hosting control panel (cPanel, Plesk, or similar).
- Open phpMyAdmin.
- Select your WordPress database.
- Click the table wp_options.
- Locate these rows:
• siteurl
• home - Edit both values to your correct updated URL
(including https if you use SSL). - Save.
Tip: If you aren’t sure which database WordPress uses, check wp-config.php for DB_NAME.
3. Update the WordPress URL via wp-config.php
You can temporarily hard‑set the WordPress URL in wp-config.php, which overrides database values.
- Connect via FTP or file manager.
- Open wp-config.php.
- Add these lines above “That’s all, stop editing!”:
define(‘WP_HOME’, ‘https://yournewdomain.com’);
define(‘WP_SITEURL’, ‘https://yournewdomain.com’);
- Save and reload your site.
If this fixes the issue, you can remove the lines later once the database is corrected.
4. Regenerate .htaccess and Fix Permalinks
A corrupted or outdated .htaccess file often causes 404 errors or redirect loops after a domain change.
Method A — If Dashboard Works
- Settings → Permalinks
- Click Save (no need to change anything)
This forces WordPress to rebuild .htaccess.
Method B — Manual (for broken sites)
- Open your website files via FTP or file manager.
- Locate .htaccess in the site root.
- Rename it to .htaccess-old.
- Create a new .htaccess file with this default content:
BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]END WordPress
- Save the file and reload your site.
If this fixes the issue, you can remove the lines later once the database is corrected.
5. Run a Search-and-Replace for Old URLs

After moving domains, your database may still contain references to the old URL inside:
- Page/post content
- Widgets
- Menus
- Serialized data
- Builder layouts (Elementor, Divi, WPBakery)
To fix this:
Option A — Use a Plugin
(If you can access WordPress admin)
Use one of these:
- Better Search Replace
- Velvet Blues Update URLs
- WP Migrate Lite
Run a search for your old domain and replace it with the new one.
Read our blog on the best WordPress URL redirect plugin to find the best one.
Option B — Use WP-CLI
If your host supports it:
code
wp search-replace 'http://oldsite.com' 'https://newsite.com' --all-tables
This updates every reference safely.
Common Errors, Causes, and Fixes
| Error Message / Symptom | Likely Cause | How to Fix |
|---|---|---|
| Site redirects to old URL | Database still storing old domain | Update siteurl/home in phpMyAdmin or wp-config.php |
| “Too Many Redirects” | Incorrect .htaccess or HTTP→HTTPS loop | Regenerate .htaccess, check SSL settings |
| Blank white screen (WSOD) | Plugin or theme referencing old URL | Disable plugins or switch theme temporarily |
| Cannot access wp-admin | Wrong site address | Override URL in wp-config.php |
| 404 errors on all pages | Broken permalinks | Resave permalinks or recreate .htaccess |
FAQs
Why is my site redirecting to the old URL?
Your database still contains the old siteurl or home value. Updating these in phpMyAdmin or wp-config.php fixes the loop.
How do I access WordPress if the admin page is broken?
Force the correct URL by adding WP_HOME and WP_SITEURL to wp-config.php. This usually restores dashboard access.
Will changing the domain break plugins or themes?
Yes, if they contain hard-coded URLs. Running a search‑and‑replace solves most issues.
Do I need to update my SSL certificate after changing the domain?
Yes—SSL certificates are domain-specific. Install a new certificate for the new domain.
Why does my site only show a white screen?
This may mean:
- Your theme is calling the old URL
- A plugin crashed after the URL change
- Try disabling plugins or switching themes through FTP.
Prevention Tips: How to Safely Change Your WordPress URL in the Future

- Always take a full backup (files + database).
- Update your URL in WordPress before moving files.
- Use a migration plugin like Duplicator, All‑in‑One Migration, or WP Migrate.
- Ensure your host has an SSL certificate ready for the new domain.
- After switching, immediately resave permalinks.
Read “WordPress Site Broken? Hosting Support Can’t Help? Try This” in detail to know what to do when the site breaks.
Conclusion
WordPress Site Broken After Changing URL is incredibly common, but thankfully, it’s one of the easiest issues to fix. By updating your site address, correcting your database, regenerating .htaccess, and replacing old URLs, you can restore your site quickly and safely.
Before making any major changes—especially domain or URL adjustments—always create a full backup. A little preparation goes a long way toward preventing headaches later.
If you prefer to leave this to the experts, WP Enchant offers reliable WordPress maintenance services, ensuring your site stays secure, optimized, and fully functional even during URL or domain changes.
References
1: WordPress.org, “Site seems to be completely broken after changing site URL” https://wordpress.org/support/topic/site-seems-to-be-completely-broken-after-changing-site-url/
2: WordPress, “I accidentally changed my site url and now I cannot access my dashboard or anything.” https://wordpress.com/forums/topic/i-accidentally-changed-my-site-url-and-now-i-cannot-access-my-dashboard-or-anything/





