
There are many reasons to change the web address of a WordPress site. You might be rebranding, moving from a temporary development URL to a live domain, switching from HTTP to HTTPS, or consolidating multiple websites. While WordPress makes the basic setting easy to find, changing the web address incorrectly can lock you out of your dashboard, break images and links, or cause a sharp drop in search traffic. This guide explains how to change the web address on WordPress safely, step by step.
Migrate Your WordPress Site Safely With AAMAX.CO
Domain changes and site migrations are high-stakes projects where small mistakes can cost traffic and revenue. AAMAX.CO is a full-service digital marketing company offering web development, digital marketing, and SEO services worldwide. Their WordPress specialists handle full migrations, database URL updates, redirect mapping, and post-launch SEO monitoring as part of their website development services. They help businesses move to a new web address without losing rankings or customers.
Understand the Two WordPress URL Settings
WordPress stores two related addresses in the General Settings:
- WordPress Address (URL): The location of your WordPress core files.
- Site Address (URL): The address visitors type to reach your website.
In most installations, both values are identical. They differ only when WordPress is installed in a subdirectory but served from the root domain.
Step 1: Back Up Your Website
Before changing anything, create a complete backup of your files and database. Use a backup plugin such as UpdraftPlus or your hosting provider's backup tool. A backup allows you to restore the site quickly if something goes wrong.
Step 2: Prepare the New Domain
If you are moving to a new domain, register it and point it to your hosting account by updating nameservers or DNS records. Add the domain to your hosting control panel and install an SSL certificate so the site can load securely over HTTPS from the start.
Step 3: Change the Address in WordPress Settings
- Log in to your WordPress dashboard.
- Go to Settings, then General.
- Update the WordPress Address (URL) and Site Address (URL) fields with your new address.
- Click Save Changes.
WordPress will log you out, and you will need to sign in again using the new address. If the new domain is not yet pointing to your server, you may lose access, so confirm DNS is working first.
Step 4: Change the Address in wp-config.php
If the fields are greyed out or you cannot access the dashboard, define the URLs in your wp-config.php file:
define( 'WP_HOME', 'https://newdomain.com' );
define( 'WP_SITEURL', 'https://newdomain.com' );Add these lines above the comment that says to stop editing. Values set here override the database settings.
Step 5: Update URLs in the Database
Changing the settings does not update links stored inside posts, pages, widgets, and theme options. Old URLs will still point to the previous domain. Use a search-and-replace tool to update them:
- Better Search Replace plugin: Run a dry run first, then replace the old URL with the new one across selected tables.
- WP-CLI: Run wp search-replace 'https://olddomain.com' 'https://newdomain.com' --skip-columns=guid for a fast, serialization-safe update.
Avoid manual SQL find-and-replace queries, because WordPress stores some data in serialized format that can break if lengths change.
Step 6: Set Up 301 Redirects
To preserve SEO value and avoid broken links, redirect every old URL to its new equivalent with permanent 301 redirects. On Apache servers, you can add rules to the .htaccess file of the old domain:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?olddomain\.com$ [NC]
RewriteRule ^(.*)$ https://newdomain.com/$1 [R=301,L]Alternatively, use a redirection plugin or your hosting provider's redirect tools. Keep the old domain registered and redirecting for at least a year.
Step 7: Update Search Console and Analytics
Add and verify the new domain in Google Search Console, submit your updated XML sitemap, and use the Change of Address tool to notify Google of the move. Update your analytics property settings, advertising accounts, and any third-party integrations that reference the old URL.
Step 8: Test Everything
- Browse key pages, posts, and product listings to confirm they load correctly.
- Check that images and media files display properly.
- Test forms, checkout processes, and login functions.
- Run a crawl with an SEO tool to identify broken links or redirect chains.
- Clear caching plugins and CDN caches.
Changing From HTTP to HTTPS
If you are only switching protocols, install an SSL certificate, update both WordPress URL settings to use https, run a search-and-replace for http to https URLs, and redirect all HTTP traffic to HTTPS. This change improves security and is a positive ranking signal.
Conclusion
Changing the web address on WordPress involves more than editing two settings. Back up your site, prepare the new domain with SSL, update the WordPress and Site Address fields, replace URLs in the database safely, implement 301 redirects, and notify search engines. Following these steps ensures a smooth transition that protects your traffic, links, and user experience.
