Changed WordPress Site URL and Now Locked Out
Higher-risk issue — be cautious and consider professional help sooner.
You changed the WordPress Address or Site Address in Settings, clicked save, and the site broke or the login page vanished. The setting is stored in the database, so it has to be put back from outside WordPress.
Common signs of this issue
- Right after saving changes to WordPress Address (URL) or Site Address (URL) in Settings, General, the site stopped loading or looked broken.
- The site loads as plain text with no styling, images, or layout.
- Going to wp-admin sends you to a different domain, a page that does not exist, or back to the login page in a loop.
- Your browser shows "too many redirects", a privacy warning, or "this site can't be reached".
- You changed http to https, added or removed www, or typed a new domain before it was set up.
- The two URL fields in Settings, General are now greyed out and cannot be edited.
Safe checks you can do yourself
None of these require sharing passwords with anyone.
- Write down exactly what you changed, character for character — the old address and the new one. A single typo, a missing "s" in https, or an extra slash is enough to cause this, and whoever fixes it will need to know.
- Try the old address in a private or incognito window. If you changed the domain, the old one may still reach your hosting account; if you changed to https, try plain http, and vice versa.
- If you switched to https, check whether a certificate is actually in place. If https shows a privacy warning, WordPress is now sending everyone to an address that is not ready, and SSL has to be fixed or the setting reverted.
- If you added or removed www, try both versions of your address. The site may still load on one of them.
- If the two URL fields are greyed out, that means someone has fixed the addresses in the
wp-config.phpfile usingWP_HOMEandWP_SITEURL. Those values override the dashboard, so the fix (or the cause) is in that file. - Check whether your host offers a WordPress manager or toolkit (Softaculous, WordPress Toolkit, or a managed host's own panel). Many let you see and change the site URL without logging in to WordPress.
- Contact your host or developer with the before-and-after addresses. Restoring the URL takes them a couple of minutes: they either edit the
siteurlandhomevalues in the database's options table, or set the correct addresses in wp-config.php. - If you have a recent backup from before the change, mention it. Restoring just the database is another clean way back, though a direct URL fix is usually faster.
What this usually means
WordPress uses those two settings to build every link, stylesheet, image path, and the login address itself. The moment you save a wrong value, WordPress starts sending visitors — and you — to that wrong place. Because the setting lives in the database, and the dashboard you would use to change it back is now unreachable, you cannot undo it from inside WordPress. That is why it feels like a lockout even though nothing has been lost.
The usual causes are a typo, switching to https before a certificate is installed, changing the domain before DNS points at the hosting account, or adding www when the server only answers on the bare domain. Each one sends the site somewhere it cannot load. The fix is always the same in principle: put the old, working address back from outside WordPress, then make the change again properly.
This counts as high-risk because the tempting fixes cause new damage. Running a search-and-replace across the database, reinstalling WordPress, or editing files on the server without a backup can turn a two-minute fix into real data loss. Your posts, pages, and settings are almost certainly still there; the goal is to change two values and nothing else.
What not to do
- Don't keep changing the address back and forth if you somehow regain access. Change it once, carefully, to the known-good value.
- Don't reinstall WordPress or delete the site to start over. Your content is still in the database.
- Don't run a database search-and-replace tool to fix it unless you have a backup and know exactly what it will change.
- Don't edit wp-config.php or the database yourself if you have never done it. A mistake there can take the whole site offline.
- Don't send your hosting password, database password, or wp-config.php file to anyone who offers help by email or in a forum.
- Don't attempt the https or domain change again until the certificate, DNS, and redirects are set up and tested first.
When to get help
If you can't reach your hosting account, the host's WordPress tools don't show the site URL, or you're not comfortable touching wp-config.php or the database, this is a good moment to ask your host or a developer — it is a small job for them and a risky one to learn on a live site. Getting help also makes sense if the change you were attempting was a move to https or a new domain: someone can restore the site and then do the switch properly, with redirects and links updated so you don't lose search traffic.
Not sure what to do next?
Answer a few short questions and we'll point you to the safest next step — DIY, a freelancer, or a direct review. No passwords required.
Is this a business website? If this issue may be costing you leads, sales, or trust, you may want a direct review instead of trial and error.
Frequently asked questions
What is the difference between WordPress Address and Site Address?
WordPress Address is where the WordPress files live. Site Address is the address visitors use. For most sites they are identical. They only differ when WordPress is installed in a subfolder but shown at the main domain.
Can I change it back from the WordPress dashboard?
Usually not, because the wrong address stops the dashboard from loading. It has to be corrected in the database, in wp-config.php, or through your host's WordPress tools.
Have I lost my content?
No. Changing the site URL does not delete posts, pages, or images. It only changes where WordPress sends people, so restoring the right address brings everything back.
Why are the URL fields greyed out?
Someone has set WP_HOME and WP_SITEURL in wp-config.php. Those lines override the dashboard settings, so the address has to be changed in that file instead.
I changed http to https and the site broke. Why?
Most likely there is no valid SSL certificate yet, or the server redirects in a way that loops. Get the certificate working first, then switch the WordPress addresses.
How long does a fix take?
For a host or developer with access, usually a few minutes. The longest part is often confirming exactly what the address was before the change.