
There are many reasons to change a WordPress website's address. You might be rebranding, moving from a temporary development domain to a live domain, switching from HTTP to HTTPS, or moving your site from a subdirectory to the root of your domain. While WordPress makes some of these changes look as simple as editing two fields, doing it incorrectly can lock you out of your dashboard, break images and links, or cause a drop in search rankings. This guide explains how to change your web address on WordPress safely, whether you use WordPress.com or a self-hosted WordPress.org installation.
Seamless WordPress Migrations With AAMAX.CO
Domain changes and site migrations are among the riskiest tasks a website owner can undertake. AAMAX.CO is a full service digital marketing company providing web development, digital marketing, and SEO services worldwide. Their WordPress specialists handle domain changes, HTTPS migrations, and redesigns while preserving rankings, links, and functionality. With their professional website development services, businesses can rebrand or relocate their WordPress sites with confidence and minimal downtime.
Understand the Two WordPress Address Settings
Self-hosted WordPress uses two key settings found under Settings, then General:
- WordPress Address (URL): The location of your WordPress core files.
- Site Address (URL): The address visitors type to reach your site.
In most installations, both values are identical. They differ only when WordPress files live in a subdirectory while the site displays at the root domain.
Step 1: Create a Complete Backup
Before changing anything, back up your entire site, including files and the database. Use a backup plugin such as UpdraftPlus or your hosting provider's backup tool. A backup ensures you can restore your site quickly if something goes wrong.
Step 2: Prepare the New Domain
Register the new domain if you have not already, and point it to your hosting server by updating nameservers or DNS records. Add the domain to your hosting account and install an SSL certificate so the new address works over HTTPS. Confirm the domain resolves to your server before proceeding.
Step 3: Change the URLs in WordPress Settings
Log in to your dashboard, go to Settings, then General, and update both the WordPress Address and Site Address fields to the new URL. Click Save Changes. WordPress will log you out, and you will need to log in again using the new address.
Alternative: Update URLs in wp-config.php
If you cannot access the dashboard, or the fields are grayed out, define the addresses in your wp-config.php file:
define('WP_HOME', 'https://newdomain.com');
define('WP_SITEURL', 'https://newdomain.com');Values defined in wp-config.php override database settings. You can also update the siteurl and home values in the wp_options table using phpMyAdmin, or use the WP-CLI command wp option update.
Step 4: Update Old URLs Throughout the Database
Changing the settings does not update links already embedded in posts, pages, menus, and widgets. Images and internal links may still reference the old domain. Use a search-and-replace tool to update every instance of the old address. Plugins like Better Search Replace handle this safely, and WP-CLI offers the wp search-replace command. These tools properly handle serialized data, which manual SQL replacements can corrupt. Run a dry run first to preview changes.
Step 5: Set Up 301 Redirects
To preserve search rankings and avoid broken links, redirect all traffic from the old domain to the new one using permanent 301 redirects. On Apache servers, add redirect rules to the .htaccess file on the old domain. On Nginx, configure a server block redirect. Redirection plugins can manage individual URL redirects, but domain-wide redirects are best handled at the server level. Keep redirects in place for at least a year, ideally permanently.
Step 6: Update Google Search Console and Analytics
Add and verify the new domain in Google Search Console, then use the Change of Address tool from the old property to notify Google of the move. Submit an updated XML sitemap for the new domain. Update your analytics property settings, advertising campaigns, and any tracking integrations to reflect the new address.
Step 7: Test Thoroughly
Browse your site extensively after the change. Check pages, posts, images, forms, menus, checkout flows, and login pages. Use a broken link checker and browser developer tools to identify mixed content warnings or resources still loading from the old domain. Clear caching plugins and your CDN cache so visitors see updated content.
Changing Your Address on WordPress.com
On WordPress.com, the process is simpler. Go to Upgrades, then Domains, and add or connect a custom domain. Once connected, set it as your primary site address. WordPress.com automatically redirects the original wordpress.com subdomain to your new primary domain. You can also change your free wordpress.com subdomain address through the site address settings, though WordPress.com may limit how often this can be done and may not redirect the old subdomain permanently.
Common Problems and Fixes
- Locked out after changing URLs: Restore correct values in wp-config.php or the database.
- Broken images: Run a search and replace for the old domain.
- Too many redirects: Check for conflicting redirect rules or SSL settings.
- Mixed content warnings: Replace http:// references with https://.
Conclusion
Changing your web address on WordPress involves more than editing two fields. Back up your site, prepare the new domain with SSL, update the WordPress and Site Address settings, replace old URLs in the database, implement 301 redirects, and notify search engines. With careful execution and thorough testing, you can move your WordPress site to a new address without losing traffic, rankings, or functionality.