Changed the WordPress Address (URL) and Now the Site or Login Is Broken
A wrong address in Settings > General can lock you out. Set the correct URLs in wp-config.php or the database.
Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.
If you typed the wrong address into WordPress Address or Site Address, the site and login may redirect to a page that does not exist.
Fix 1: wp-config.php
Add these lines above the stop-editing line, using your real address:
define( 'WP_HOME', 'https://yourdomain.com' );
define( 'WP_SITEURL', 'https://yourdomain.com' );
These override the database values. Log in, correct the settings, then remove the lines if you want to manage the address from the dashboard.
Fix 2: phpMyAdmin
Open the wp_options table (your prefix may differ) and edit the rows siteurl and home.
Rules for the address
- Use
https://if you have SSL. - Keep
wwwor non-www consistent with your DNS and redirects. See our redirect guide. - Do not add a trailing slash.
Still looping?
See our login loop guide and our redirect guide.
Related guides
- YouTube Video Embed Not Working or Showing an Error on Your Website
- WordPress XML Sitemap Gives 404 or Is Not Generating
- wp-config.php Explained: The Settings That Matter and How to Edit Them Safely
- WordPress White Screen of Death: How to Fix a Blank Page
Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.