WordPress Change URL: WordPress Address vs Site Address for Changing a Website URL

Change the WordPress Address only when the WordPress core files are moving; change the Site Address when the public website URL is changing. Those two fields look almost the same, but they control different things: where WordPress is installed and what visitors type to reach the site. WordPress identifies them as siteurl and home in the database, which is why one wrong edit can lock you out of the admin area [source: WordPress].

TLDR: If your site is moving from http://example.com to https://example.com, you usually change both WordPress Address and Site Address to the HTTPS version. If WordPress files live in a subfolder, such as example.com/wordpress, but visitors should see example.com, the two values should be different. In one typical migration of a 50-page business site, a missed URL setting can leave 20% to 40% of internal links, images, or redirects pointing to the old address. Back up the site first, then update URLs in a controlled order.

WordPress Address vs Site Address: the practical difference

The WordPress Address is the location of the WordPress installation. In technical terms, it is the siteurl value. WordPress uses it to find core files, admin screens, scripts, and system paths.

The Site Address is the public address people use to view the website. In technical terms, it is the home value. Themes, menus, canonical URLs, and many front-end links rely on it.

Most simple websites use the same value for both fields. For example:

  • WordPress Address: https://example.com
  • Site Address: https://example.com

That setup is common when WordPress sits in the root directory of the domain. It is also the usual setup after switching from HTTP to HTTPS.

The values differ when WordPress is installed in a subdirectory, but the public site should appear at the main domain:

  • WordPress Address: https://example.com/wordpress
  • Site Address: https://example.com

This is valid, but it must be set up with care. A careless edit can break login pages, media files, redirects, or theme assets.

When to change both URL fields

Change both fields when the whole site is moving to a new public URL and the WordPress files stay in the same relative place. Common cases include:

  • Changing from http:// to https://
  • Moving from oldsite.com to newsite.com
  • Switching from www.example.com to example.com
  • Moving a staging site to a live domain

In these cases, both values usually need to match the final public URL. If only one field changes, WordPress may generate mixed links. That means some pages may point to the new domain while scripts, images, or admin links still point to the old one.

Honestly, it feels like a tiny typo in these fields gets punished far harder than it should. One missing letter can turn a normal login into a 403 error, a redirect loop, or a blank admin page.

When to change only Site Address

Change only the Site Address when WordPress remains installed in a subfolder, but the public site should load from the root domain. This setup is less common, but it is still used by agencies, older sites, and custom hosting setups.

Example:

  • WordPress files are stored at https://example.com/cms
  • Visitors should see the site at https://example.com

In that case:

  • WordPress Address: https://example.com/cms
  • Site Address: https://example.com

This is not just a visual choice. WordPress still needs to know where its core files live. If you set the WordPress Address to the root when the files are actually in /cms, the admin area may stop loading.

How to change the URL in the WordPress dashboard

The easiest method is through the admin dashboard:

  1. Log in to WordPress.
  2. Go to Settings > General.
  3. Edit WordPress Address (URL) if the install location changed.
  4. Edit Site Address (URL) if the public URL changed.
  5. Click Save Changes.
  6. Log in again if WordPress signs you out.

Before saving, copy the current values into a text file. It is a boring step, but it can save you 30 minutes of cleanup if the site starts redirecting to the wrong place.

After saving, check the home page, one blog post, the login page, and the media library. Also test the site in a private browser window. Cached sessions can hide URL problems.

What to do if the dashboard is locked

If the site breaks after changing the URL, do not panic. The values can be repaired outside the dashboard.

Option 1: edit wp-config.php

You can define the URLs in wp-config.php. Add these lines above the line that says That’s all, stop editing:

define('WP_HOME', 'https://example.com');
define('WP_SITEURL', 'https://example.com');

This can restore access. It also makes the dashboard fields uneditable, because the file value takes control.

Option 2: edit the database

In phpMyAdmin or another database tool, open the WordPress database and find the wp_options table. The prefix may be different. Look for these option names:

  • siteurl
  • home

Edit the values carefully. Use the full URL, including https:// if SSL is active. Do not add a trailing slash unless the old value used one for a specific reason.

Option 3: use WP-CLI

On servers with WP-CLI, this is often the cleanest repair method:

wp option update home 'https://example.com'
wp option update siteurl 'https://example.com'

It drives me crazy that many hosting panels bury terminal access three screens deep. Still, WP-CLI is fast and precise when it is available.

Do not forget serialized data and hardcoded links

Changing the two main URL fields does not update every old URL across the database. Page builders, widgets, menus, custom fields, and old posts may contain hardcoded links. Some values may be serialized, which means a basic search and replace can damage the data.

Use a migration-safe search and replace tool. Many developers use WP-CLI for this:

wp search-replace 'https://oldsite.com' 'https://newsite.com' --skip-columns=guid

The guid column is usually skipped because it was not designed to be rewritten for normal migrations. After the replacement, clear all caches. That includes plugin cache, server cache, CDN cache, and browser cache.

HTTPS changes need extra checks

When moving from HTTP to HTTPS, update both URL fields to the HTTPS version. Then confirm that the SSL certificate works. If the certificate is missing or expired, browsers will show security warnings.

Also check for mixed content. This happens when the page loads over HTTPS, but images, scripts, or stylesheets still load over HTTP. The page may look broken. Some browsers block those files completely.

A proper HTTPS switch should include:

  • Valid SSL certificate
  • Updated WordPress Address and Site Address
  • Search and replace for old HTTP links
  • 301 redirects from HTTP to HTTPS
  • Updated CDN and cache settings
  • Updated Google Search Console property, if needed

Best practice before changing a WordPress URL

Treat URL changes like a small migration, not a quick setting tweak. The safer order is simple:

  1. Create a full backup of files and database.
  2. Confirm the new domain or SSL certificate works.
  3. Change the WordPress URL settings.
  4. Run a safe search and replace.
  5. Flush permalinks under Settings > Permalinks.
  6. Clear every cache layer.
  7. Test login, checkout, forms, images, and redirects.

For most standard sites, WordPress Address and Site Address should match. Change only the Site Address when WordPress stays in a subfolder and the public site uses a cleaner root URL. If you remember that split, URL changes become much less risky.