Changing a WordPress website address sounds small, but one misplaced character can stop the site or its dashboard loading. This guide explains the sensible way to do it, plus what to do if you have already locked yourself out.
What are the WordPress Address and Site Address?
For most websites, both settings are the same. The WordPress Address (URL) is where the WordPress files live. The Site Address (URL) is the address visitors type to see the website.
They can be different when WordPress is deliberately installed in a subfolder, for example with the files in https://example.com/wordpress but the public site at https://example.com. That is a more specialist setup. Do not change only one setting unless you are certain that is how your site is configured.
The usual method: change it in WordPress
Use this route when you can still sign in to the WordPress dashboard and you are making a planned change. It is the least risky option.
- Sign in to WordPress.
- Go to Settings → General.
- Update WordPress Address (URL) and Site Address (URL). On a standard site they should match exactly.
- Use the full secure address, such as
https://example.com. Do not add a trailing slash. - Click Save Changes. WordPress may sign you out, so sign in again using the new address.

https://example.com, https://www.example.com and http://example.com are different addresses. Choose the version your site already uses and make sure your SSL certificate and redirects support it.If the dashboard is unavailable: temporarily set the address in wp-config.php
If a URL change has gone wrong and you cannot sign in, a developer can set the two values in WordPress’s configuration file. This overrides the database values, which is why the address fields will appear unavailable in the dashboard while these lines remain in place.
Open wp-config.php in the main WordPress folder and add the following immediately above the line that says /* That's all, stop editing! Happy publishing. */:
define( 'WP_HOME', 'https://example.com' ); define( 'WP_SITEURL', 'https://example.com' );
Replace the example address with the correct one for your website. Save the file and test both the public site and /wp-admin. Once the underlying problem has been corrected, remove these lines if you want WordPress to manage the values through Settings again.

Last resort: change the values in the database
Use the database only when neither the dashboard nor the website files are available. Make a database backup first. In phpMyAdmin, open the WordPress database, then the options table. It is usually named wp_options, although the first part may be different.
Find the rows called siteurl and home, edit their option_value entries, and set each one to the correct full address. Do not alter other rows. This method changes the core address settings only; it will not update links stored in page content, menus, images or plugin settings.

What to check afterwards
- Open the homepage, a few internal pages and the contact form.
- Sign in at
https://example.com/wp-admin. - Clear any website, plugin and browser caches.
- Check that images, downloadable files and the secure padlock are loading correctly.
- Save Settings → Permalinks once if you see page-not-found errors.
If you have changed domain name
Changing the core address is only one part of moving a site. You will normally also need a proper 301 redirect from every old address to its new equivalent, updates to internal links and media references, a review of email and form settings, and changes in Google Search Console and analytics. A tool which understands WordPress serialised data should be used for the content update. A basic database find-and-replace can damage plugin settings.
