How to Change the WordPress Site URL
Changing your WordPress site URL is needed after moving to a new domain or to HTTPS. Do it the right way to avoid the dreaded redirect loop.
Step-by-step
- Easiest route (if you can log in): wp-admin → Settings → General → set WordPress Address (URL) and Site Address (URL) to the new address (include https://) → Save.
- If you are locked out, use phpMyAdmin. Open Databases → phpMyAdmin → your WordPress database → wp_options table.
- Edit the "siteurl" row and set option_value to the new URL (e.g. https://yourdomain.com).
- Edit the "home" row the same way.
- Clear caches — any caching plugin and your browser — then load the site.
- Fix internal links still pointing at the old URL with a search-replace plugin or an SQL update (back up first).
💡 Good to know
- Moving to HTTPS? Pair this with moving WordPress to HTTPS and forcing HTTPS.
- A redirect loop after changing the URL usually means siteurl and home disagree — make them identical.
- Always back up the database before editing wp_options.