Independent, hands-on guides to hosting, SEO and marketing tools. No paid rankings, ever.See how we test →

How to Change Your WordPress Domain Name Safely

Learn how to change your WordPress domain safely, with backups, URL updates, redirects and SEO checks.

Serp & Server is reader-supported. When you buy through links on our site, we may earn an affiliate commission, at no extra cost to you. It never decides our rankings. Here’s how it works.

Checklist illustration for how to change WordPress domain safely
Jump to a section

If you need to change WordPress domain without breaking your site, the safest route is to plan the move, update WordPress correctly, add redirects, and check search engines afterwards.

This guide explains the practical steps for a small-business WordPress site, whether you are rebranding, moving away from a test domain, or trying to move WordPress to new domain after buying a better web address.

We will also cover when a simple WordPress change domain name job is enough, and when it becomes a fuller migration that needs hosting, database and SEO checks.

Before you change WordPress domain: plan the move

A domain change is not just a setting in WordPress. It affects your links, images, logins, analytics, email addresses, redirects and search listings.

You should change WordPress domain during a quiet period, not just before a big advert, launch or seasonal rush. Make sure you can access your domain registrar, hosting control panel, WordPress admin, database backup tool and Google Search Console.

  • Old domain: the address people currently use.
  • New domain: the address you want people and search engines to use next.
  • DNS: the records that tell browsers which server handles your domain.
  • 301 redirect: a permanent redirect from an old URL to its matching new URL.
  • Search and replace: updating old domain references inside the WordPress database.

Do not change WordPress domain until you have a recent backup of both files and the database. If you are changing host as well, read our guide to migrating a WordPress site without downtime first, because the domain step is only one part of the move.

The safe ways to change WordPress domain

Most small sites can change WordPress domain in one of three ways. The right choice depends on whether the site is staying on the same hosting account, moving hosts, or being rebuilt from a staging copy.

Redirect map for a safe change WordPress domain process
Map old URLs to matching new URLs before launch.
MethodBest forRisk levelWhat to watch
Change WordPress settings onlySame host, same files, new domain points to the same siteLow to mediumOld URLs inside content may still need replacing
Hosting control panel migrationBeginners using managed WordPress hostingLow if the host handles redirectsCheck SSL, email, redirects and backups yourself
Manual database and file moveDevelopers, staging sites, or a host changeMedium to highSerialized data, permissions and wp-config.php details

If your host offers a staging tool, test there first. Many managed hosts also provide WordPress migration help, and our WordPress hosting guides explain the hosting terms you are likely to see.

When it is a WordPress change domain name job

It is a WordPress change domain name job when the same website, content and URL paths are staying in place, and only the domain is changing. For example, oldexample.co.uk/about/ becomes newexample.co.uk/about/.

That is simpler than changing every page slug, rebuilding the site, or merging two websites. Keep the page paths the same where possible, because one-to-one redirects are cleaner for visitors and search engines.

When you need to move WordPress to new domain and host

If you also need to move WordPress to new domain and host, treat it as a migration. Copy the files, export and import the database, update wp-config.php if database details change, then update URLs and redirects.

WordPress.org’s official migration guidance says domain and URL changes need extra care because old references can remain in the database. It recommends safe search-and-replace methods, including WP-CLI where available: WordPress migration documentation.

How to change WordPress domain in WordPress and hosting

When you change WordPress domain on the same hosting account, start by pointing the new domain to the right server. Your host may call this an add-on domain, parked domain, alias domain or primary domain change.

  1. Buy or transfer the new domain.
  2. Point its DNS records to your web host.
  3. Install or issue an SSL certificate for the new domain.
  4. Back up the WordPress files and database.
  5. Log in to WordPress and go to Settings then General.
  6. Update WordPress Address (URL) and Site Address (URL).
  7. Save changes, then log in again at the new address.
  8. Go to Settings then Permalinks and save, even if you do not change the structure.

WordPress.org’s permalinks documentation explains that saving the Permalinks screen updates the rewrite rules WordPress uses for clean URLs: WordPress permalinks documentation. If your host blocks automatic changes to .htaccess, you may need their help.

If you cannot access the dashboard after changing the URLs, do not panic. The values are stored in the database, usually as siteurl and home in the wp_options table, so they can be corrected through phpMyAdmin or your host’s support team.

Update old URLs inside the WordPress database

The dashboard settings change the main site address, but they may not update links inside posts, buttons, menus, widgets, blocks, page builder data or image references. To change WordPress domain properly, you need to find and replace the old domain safely.

Do not run a rough SQL replace unless you know how WordPress stores serialized data. Serialized data includes length counts, and a careless replace can break widgets, theme settings or page builder layouts.

If you have SSH access, WP-CLI is often the cleanest method. The official command supports a dry run, so you can see what would change before writing to the database: WP-CLI search-replace documentation.

wp search-replace 'https://oldexample.co.uk' 'https://newexample.co.uk' --skip-columns=guid --dry-run
wp search-replace 'https://oldexample.co.uk' 'https://newexample.co.uk' --skip-columns=guid

The --skip-columns=guid part is commonly used because the guid field is not meant to be treated as a normal public URL. If you are not comfortable with the command line, use a reputable search-and-replace plugin or ask your host to do it.

After the replace, check your homepage, contact form, menus, footer links, downloadable files and key landing pages. If you recently launched the site, our guide to starting a WordPress blog may help you review the basics you set up at the beginning.

SEO steps after you change WordPress domain

If you change WordPress domain and want to protect search traffic, redirects matter. Every useful old URL should point to the matching new URL, not just to the new homepage.

Google’s site move documentation recommends mapping URLs, testing redirects, updating canonical tags, submitting the new sitemap, and using the Change of Address tool when moving from one domain or subdomain to another: Google site move documentation.

A basic Apache redirect for a like-for-like domain move might look like this, but check with your host before editing server files:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^oldexample\.co\.uk$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www\.oldexample\.co\.uk$ [NC]
RewriteRule ^(.*)$ https://newexample.co.uk/$1 [R=301,L]

Google says redirects should be kept for as long as possible, generally at least one year, and from a user point of view it can be sensible to keep them indefinitely. Update your own internal links, social profiles, email signatures, directory listings and advert landing pages as soon as you can.

Use Google Search Console’s Change of Address tool after the move and redirects are working. Google’s help page says the tool tells Google to prioritise crawling and indexing the new site over the old one: Google Change of Address tool help.

Test after you change WordPress domain

Testing is where you catch the small problems before customers do. After you change WordPress domain, test as a visitor, as an admin user, and as a search engine would see the site.

  • Open the new homepage in a private browser window.
  • Click the main menu, footer links and calls to action.
  • Submit a test contact form and check the email arrives.
  • Check that the SSL padlock appears without browser warnings.
  • Visit important old URLs and confirm they redirect to matching new URLs.
  • Check images and downloads load from the new domain.
  • Look for mixed content, where an HTTPS page still calls HTTP assets.
  • Submit the new XML sitemap in Search Console.

Also check your WordPress admin area. If plugins, page builders or licence keys were tied to the old domain, you may need to reconnect them or update the licence domain in the vendor account.

Analytics needs attention too. Update the property settings where relevant, annotate the date of the move, and keep an eye on organic traffic, form submissions and checkout behaviour for several weeks.

Common mistakes to avoid

The worst time to change WordPress domain is when you are rushing. Most serious problems come from skipping backups, replacing URLs badly, forgetting redirects, or changing too many things at once.

Try not to change your domain and your permalink structure at the same time. If /services/web-design/ can stay as /services/web-design/, keep it that way and only change the domain.

Redirecting everything to the homepage

Homepage-only redirects are poor for visitors and can be confusing for search engines. Map old pages to their new equivalents, especially pages with traffic, backlinks or enquiries.

Forgetting non-WordPress assets

PDFs, downloadable brochures, tracking scripts, embedded forms and hard-coded theme links can still point to the old domain. Search the theme files and media library if something looks odd.

Letting the old domain expire too soon

Keep the old domain for the long term if it has brand value, backlinks, printed material or customer recognition. Losing control of it can break redirects and may create brand or security problems.

How to Change Your WordPress Domain Name Safely FAQs

Can I change WordPress domain without losing SEO?

Yes, but you need to handle it carefully. Keep the same URL paths where possible, set up 301 redirects from old URLs to matching new URLs, update internal links, submit the new sitemap, and use Google Search Console after the move.

How long does it take when I change WordPress domain?

The technical change can take minutes once DNS, SSL and hosting are ready. DNS changes can still take time to settle, and search engines may take weeks to process the move fully, depending on site size and crawl activity.

Is a WordPress change domain name update the same as moving host?

No. A WordPress change domain name update can happen on the same hosting account, while moving host means copying files and the database to a different server. If both happen together, plan it as a full migration.

Do I need a plugin to change WordPress domain?

Not always. You can update the main URLs in WordPress settings, but a plugin or WP-CLI command is often useful for replacing old domain references inside posts, menus, widgets and page builder data.

What is the safest way to move WordPress to new domain?

The safest way to move WordPress to new domain is to back up, test on staging if possible, keep the same URL paths, update the database with a safe search-and-replace tool, then add 301 redirects. Check forms, images, SSL and Search Console before calling the move finished.

Final word

A careful plan makes change WordPress domain work much smoother. Back up first, keep URL paths stable, update the database safely, add one-to-one redirects, and tell Google once the move is live.

If your site earns leads or sales, consider asking your host or developer to handle the switch. The job is not usually huge, but a small mistake can cause avoidable downtime, broken forms or lost search traffic.

Enjoyed this guide?

Get the newsletter

Get more guides like this one on the topics you choose. Confirm your email and you are done.

  • Pick only the topics you care about
  • About one email a week, no spam
  • Change topics or unsubscribe any time
Newsletter signup


Serp & Server Avatar

Written by

Keep reading