HowTo

WordPress Site Address: 7 Essential, Safe Change Checks

Change a WordPress site address without breaking the website
WordPress site address change guide
Plan the destination, recovery access and verification before changing the public address of an existing WordPress installation.

Changing your WordPress site address sounds like a one-field job: type the new URL, click save, done. Then the page reloads into an error, your dashboard disappears, and you’re locked out of your own site. It happens to a lot of site owners — and it’s completely avoidable.

This guide shows you when you actually need to change the site address, how to prepare, the safe ways to make the change, how to fix old links, and what to do if you end up in a redirect loop.

When you need to change the site address

WordPress stores two URLs in Settings → General:

  • WordPress Address (URL) — where the WordPress files live.
  • Site Address (URL) — the address visitors type to reach your site.

For most sites, both are the same. You’ll need to change them when you:

  • Move from a temporary or staging domain to your real domain.
  • Switch from http:// to https:// after installing SSL.
  • Rebrand to a new domain name.
  • Move between www and non-www versions.
  • Move WordPress out of a subfolder (like /wp/) to the root.

Site Address overview — WordPress Site Address: 7 Essential, Safe Change Checks

Backing up before you start

Never change your site address without a full backup. If something goes wrong, a verified backup and recovery procedure provide a way to restore the previous state; recovery time varies.

  1. Back up the database — this is where the URLs are stored.
  2. Back up your files, especially wp-config.php and wp-content.
  3. Download the backup to your computer, not just to the server.
  4. Make sure you can reach your hosting panel and file manager, in case you get locked out of WordPress.

Need a backup tool? Compare options in Best Backup Plugins for WordPress Compared.

Changing the URL in Settings or wp-config

Method 1: Settings (simplest)

  1. Go to Settings → General.
  2. Update the values required by the actual installation layout. The two addresses can differ when WordPress files are kept in a separate directory; do not force them to match without checking the design.
  3. Make sure the new domain already points to your hosting and SSL is active if you’re using https://.
  4. Click Save Changes. You’ll be logged out; log in again at the new address.

Method 2: wp-config.php (when you can’t reach the dashboard)

If you’re locked out, open wp-config.php in your hosting file manager and add these two lines above the line that says “That’s all, stop editing!”:

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

These constants override the stored values without updating those values in the database. Recovery still depends on the correct hostname, protocol, path and server configuration. The fields in Settings will appear greyed out while these lines are present.

Method 3: phpMyAdmin — in the wp_options table, edit the siteurl and home rows. Use this only if you’re comfortable working in the database.

Fixing old links in the database

Changing the site address doesn’t update links inside your content. Images, internal links, and menus may still point to the old URL, which causes broken images and mixed-content warnings.

The fix is a search and replace across the database:

  • Use a plugin such as Better Search Replace, or WP-CLI: wp search-replace 'http://olddomain.com' 'https://newdomain.com' --skip-columns=guid --dry-run.
  • Always run a dry run first to see how many changes will be made.
  • Use a proper tool — never a plain text editor on an SQL file. WordPress stores some data in serialized form, and a naive replace can corrupt it.

If you changed domains, also set up 301 redirects from the old domain to the new one so visitors and search engines follow you, and update the domain in Google Search Console.

Troubleshooting redirect loops

“Too many redirects” is the most common problem after a URL change. Work through these checks:

  1. HTTP vs HTTPS mismatch: make sure both URLs use the same protocol and that SSL is really active on the domain. Read What Is SSL? How to Get HTTPS for Free if you’re unsure.
  2. www vs non-www: confirm your URLs match the version your host or CDN redirects to.
  3. Cloudflare SSL mode: review the proxy and origin HTTPS configuration against the provider documentation. Use valid certificates and the appropriate validated connection rather than weakening checks to suppress the symptom.
  4. Clear every cache: your caching plugin, server cache, CDN, and browser.
  5. Check .htaccess for old redirect rules that point back to the previous address.

Still stuck? Use the wp-config.php method above to force the correct URLs, then fix the rest from the dashboard.

Tools and hosting that help

A fast, well-supported host makes every WordPress task smoother. Kawedma WordPress hosting and managed WordPress hosting powered by Rocket.net include staging sites for safe testing, while shared hosting from Hosting.com or Kawedma shared hosting suit smaller sites. Protect the site with an SSL certificate and automatic backups from CodeGuard.

Key takeaways

  • Back up the database and files before changing anything.
  • Confirm the intended WordPress Address and Site Address for the actual file layout.
  • Use wp-config.php to recover if you get locked out.
  • Run a proper search-replace to fix old URLs in your content.
  • Most redirect loops come from HTTP/HTTPS or www mismatches.

WordPress site address: 7 essential checks

  1. Define the exact address change.
  2. Confirm the installation layout and current configuration.
  3. Prepare DNS, hosting and HTTPS for the destination.
  4. Verify backup and recovery access.
  5. Apply the method appropriate to the site.
  6. Review stored references and redirects.
  7. Test the public site and administration workflow.

The official WordPress migration guide describes different layouts and recovery approaches. Use it to choose the method for the actual installation. The site address field is not a shortcut that moves files, creates a certificate or transfers a database.

Define what is changing

Write the current public address and the intended destination, including protocol, hostname and any path. Then state why the change is needed. Switching to HTTPS, moving from staging and changing a brand domain can involve different dependencies. A clear description prevents an address edit from becoming an unexplained change to the whole application.

Record where the WordPress files currently live and how the web server routes requests. If the installation intentionally uses a separate directory, preserve that design unless the project includes a file-layout change. The site address should reflect the planned public route, while other settings must match their own role.

A hosting migration can sometimes preserve all public URLs. Do not change the site address merely because the server changed. First identify the requirement and verify the destination. An unnecessary public URL change adds redirects, references and testing to a project that may not need them.

Check for configuration overrides

If the address fields are unavailable or an edit does not behave as expected, review the supported configuration with the host or developer. Constants or managed settings can override what is stored in the database. Do not repeatedly alter the same field without understanding which source is active.

The WordPress configuration documentation explains the address constants and their relationship to stored values. Keep temporary recovery changes documented so another administrator does not mistake them for the long-term intended setup.

For the site address investigation, record the current source of truth and the proposed correction. If more than one system manages the value, assign ownership before changing production. This reduces the chance that a management tool later restores an old setting.

Prepare the destination before saving

The intended hostname must reach the correct service, and the service must be ready to handle that hostname. Confirm DNS and web-server configuration with the responsible provider. A valid record pointing to a server does not prove that the server serves the right WordPress installation.

Verify HTTPS for the intended public name before relying on a secure site address. Review certificate coverage and the full connection path if a proxy is present. A browser warning should be investigated, not accepted as the expected result of changing a URL field.

Check any access restrictions used during preparation. A staging password or temporary routing setup can affect testing. Document what must remain private and which restrictions are intended to change at launch. Keep the scope of those changes separate from the WordPress address values.

Site Address checklist — WordPress Site Address: 7 Essential, Safe Change Checks

Confirm recovery before the site address edit

Make sure the backup includes the data and configuration needed for this installation. Know where it is stored and how a restoration would be performed. A backup date is useful, but a recovery process that has never been understood leaves uncertainty during an outage.

Confirm access to the hosting or management interface through the organization’s approved account process. If WordPress administration becomes unavailable, someone should still be able to inspect the relevant configuration. Do not discover during the incident that the only recovery account belongs to a former contractor.

Write down the previous site address and the planned change. Keep secrets in the appropriate credential store, not in a public support note. Assign a person to coordinate the change and another to verify the public result where the team size allows it.

Use the appropriate editing method

For a straightforward installation, the normal administration fields may be suitable once the destination is ready. For another layout, a managed environment or a recovery case, follow the documented method that matches the setup. Do not apply every method in the article at once.

A constant-based recovery and a direct database correction have different effects. Keep the original values and understand what each operation changes. The site address should not be edited through several competing mechanisms without a record of which one is intended to remain active.

If the site is part of a Multisite network or a complex managed deployment, treat the move as a separate technical project. A single-site example is not a complete network migration procedure. Back up, test and obtain guidance appropriate to the actual architecture.

Review stored references carefully

Content, widgets, menus, plugin settings and generated files can contain old URLs. Changing the site address does not necessarily update every reference. Inventory the places that matter to the visitor journey and test representative pages after the change.

Use a tool that understands the data it edits. The WP-CLI search-replace reference documents dry runs, column exclusions and table scope. Review the proposed matches before applying replacements, and choose the scope for the real site rather than running a copied command blindly.

The example above is a dry run, not an instruction to alter this website. Replace example values only in an authorized project with a backup and a reviewed plan. Keep the operation and its result in the migration record, then inspect the affected application behavior.

Check redirects without creating loops

Identify which layer handles redirects: the application, web server, control panel or CDN. Record the intended canonical destination and compare every active rule with it. A loop can occur when two layers disagree about protocol or hostname.

Test an old URL through to the final destination and inspect the route. Include representative deep links rather than only the home page. The site address can be correct while an older redirect rule still sends visitors back to a previous hostname.

Do not clear the symptom by disabling unrelated protections. Diagnose the conflicting configuration and apply a targeted correction. Keep the previous rule and retest the same path so the team can establish whether the change resolved the problem.

Separate caches from configuration errors

A cache can preserve an older page or redirect, but not every problem is a cache problem. Record the current public response and the configuration before clearing anything. Then use the appropriate cache controls for the layer involved.

If the site address and server routing disagree, cache clearing alone will not produce a durable fix. Likewise, a correct page in an administrator session does not prove that an ordinary visitor sees the same result. Test with a suitable visitor context and record what differs.

Keep DNS caching separate from page caching. A resolver returning an old destination and a browser displaying an old image are different observations. Diagnose the layer that contains stale information before making another production edit.

Test administration and public behavior

After the change, verify that authorized administrators can sign in at the intended location. Check the dashboard links and a controlled editing workflow. Do not assume a successful login proves that all public pages and integrations use the new site address.

As a visitor, review navigation, images, forms and important downloads. If the site is a store, use the supported test flow for checkout and notifications. Avoid real customer data or unintended payment activity in a routine migration test.

Inspect the emails generated by the application using an account you control. A password reset or order link can reveal an old hostname that a home page test misses. Record the failing message type and the setting responsible rather than replacing unrelated content across the whole database.

Keep search and business references consistent

If public URLs changed, include relevant redirect and search-monitoring work in the project. Update internal references and review platform-generated canonical and sitemap information. A changed site address should agree with the intended public destination.

Review business profiles, templates and links under your control. Prioritize the routes customers use to reach the site. A logo update does not automatically change an invoice template or a saved support link, so keep a list of the places reviewed.

Do not guarantee unchanged rankings after a public URL move. Monitor technical health and relevant business outcomes, and investigate concrete errors. A plugin score is one diagnostic signal; it is not a promise that search visibility will remain constant.

Work through a staging launch example

Imagine a business preparing a WordPress site on a temporary hostname. Before launch, the team checks the real domain, HTTPS and destination routing. It records the existing installation layout and verifies a backup. The developer chooses the appropriate method for changing the site address and stored references.

After applying the planned change, the team tests administration, important public pages and a controlled form submission. It checks generated links and the intended redirects. Any temporary configuration is documented and reviewed instead of left unexplained in a file.

The handover includes the current site address, the responsible host and the recovery route. This gives the business a maintainable result rather than a working home page with hidden dependencies. If a later problem appears, the change record provides a useful starting point.

Site Address next steps — WordPress Site Address: 7 Essential, Safe Change Checks

Discuss the WordPress setup with KAWEDMA

Visit KAWEDMA to review WordPress hosting, domains and website development services. If your project includes a site address change, explain the current layout, destination and required testing. Confirm which migration and setup tasks are included in the agreed service scope.

WordPress site address questions

Must both address fields always match?

No. Some layouts intentionally use different locations for the WordPress files and the public site. Follow the documented design for the actual installation.

Does changing the field move my files?

No. Hosting, files, data and routing need their own preparation. The site address field is not a complete migration tool.

Will a configuration constant update the stored database value?

An override and a database edit are different operations. Review the official documentation and keep temporary recovery settings recorded.

Should I run a replacement command without reviewing it?

No. Use a backup, a dry run and the correct scope. Inspect representative results and application behavior afterward.

Keep the final site address and tested recovery route in the handover notes.

Z
zasma171

Writes for Hostreta about the topics covered in this article.

Comments (0)

Your email address will not be published. Required fields are marked *

Ad
Affiliate links
Tools we recommend
Protect Your Website with Automated Daily Backups
$2.09
Get it
the easiest way to manage all of your social media accounts
$29
Get it
Starter Website Get online, properly
$249
Get it
google workspace Business Starter
$3.75
Get it
Nord Vpn Cybersecurity. Built for Everyday Use
$8.99
Get it
More hosting options · affiliate
AI SiteBuilder
View plans
AI Application Hosting
View plans
Shared Hosting
View plans
Reseller Hosting
View plans
Managed WordPress · Rocket.net
View plans
Unmanaged VPS Hosting
View plans
Managed VPS Hosting
View plans
Virtual Dedicated Servers
View plans

We may earn a commission on purchases made through these links, at no extra cost to you.

Ad
Ad

$ top hosting picks

affiliate
★★★★★

KAWEDMA Website Services

See optionsCheck current plans and terms
  • Explore website setup services
  • Choose a scope that fits your project
  • Confirm features with KAWEDMA
Explore KAWEDMA →
affiliate link · we may earn a commission
★★★★★

Managed WordPress Hosting

See plansCurrent terms on provider website
  • Managed hosting for WordPress
  • Powered by Rocket.net
  • Compare current plan specifications
View WordPress plans →
affiliate link · we may earn a commission
★★★★★

AI SiteBuilder

See plansCheck current offer and renewal terms
  • Explore AI-assisted website creation
  • Review included tools and features
  • Choose a plan for your project
Explore SiteBuilder →
affiliate link · we may earn a commission

Never miss a new article

Join thousands of developers and builders getting a weekly digest of the best tech articles.