01/23/2025 | News release | Distributed by Public on 01/23/2025 06:13
Updated: January 23, 2025
Published: December 02, 2020
At the start of the year, I had worked on a business rebrand that included a WordPress domain name change. I took the easy way out by asking my hosting company to handle the redirect for me. But, what if I wanted to make the change myself?
I could see myself making a similar switch on my personal website in the future. So, I wanted to learn what it would actually take to change a domain name on WordPress by myself. I looked into the process for WordPress.com and WordPress.org.
Here's a step-by-step guide of what I found.
Table of Contents
There are a million and one reasons why you might want to change your WordPress domain name. A common reason? Perhaps you want to give that old website with the early aughts doman a refresh. I mean, supercoolsk8rdude.com doesn't quite scream working professional.
Other common reasons sites change their domain names include:
I've also had to change domain names when switching from a free platform (like yourdomain.wordpress.com) to a paid option (like yourdomain.com). Paid hosting can communicate that you're an established business ready for action.
Host your website on a fully managed and optimized infrastructure that scales with your business.
Whatever your reasons, changing your WordPress domain name is a serious consideration.
Why? Well, with over 650 million registered domain names, finding a new domain name for your business or personal use can be a chore. You have to find a memorable domain that's still available.
And even after you find that perfect unregistered name, you could damage your WordPress site's SEO - or even completely lose your content - if you don't change the name correctly.
Before you get started, it's essential to know all the steps to changing a domain name, from choosing a new one to backing up your website to redirecting URLs. I'll explain in a how-to guide below.
For businesses rebranding, HubSpot provides a seamless way to connect a new domain while offering free hosting to support your refreshed online presence.
Before you start digging into your website's wp-config.php file or the File Transfer Protocol (FTP), there are a few important to-do you need to check off.
Before moving everything over, you must choose and own your new domain name. You've done this before. For my change, I used a different hosting company because they were running a discount on domain name registrations (who doesn't love a discount!).
There are plenty of domain registrars online, and some hosting services even offer free domains. HubSpot's CMS, for example, allows users to host their websites for free.
If you need help setting up your domain, check out this free HubSpot course on building a WordPress website.
Nothing would be worse than completely losing all your content under your domain name during your transfer. I've had a scare before, and I don't want that to happen to you. To avoid a nightmarish scenario, you need to back up your current website.
Fortunately, backing up a website is easy. I recommend using a WordPress backup plugin like BlogVault, Backup Buddy, and Duplicator. These are easy to install and offer enough coverage for your work if something goes wrong.
Other backup options include using your website's cPanel Backup Wizard, a custom host backup tool, or doing a manual backup with FTP and phpMyAdmin. I typically don't recommend the manual backup option because it's more time-consuming, harder to restore, and requires technical expertise. However, if you have a solid web background and this is your preference, go for it.
Once you have a new domain name solidified, you'll want to let your audience know that they'll see some changes. You can notify your audience with a website banner, blog post, social media update, or newsletter.
Let them know when they can expect to see your new domain, and reassure them that they can still access your content. If you expect your site to be down during the transition, note that as well.
Now that you've completed the prerequisites for a domain name change on WordPress, what next? This next stage can get a bit technical, but you'll be fine if you follow these steps closely.
Log into your WordPress account, and from the dashboard, go to Settings > General.
Change the WordPress Address (URL) and Site Address (URL) to your new domain name.
Click Save at the bottom of the page.
What is the wp-config.php? This is a crucial file in your WordPress installation that contains important data and configuration information from your website. To access and update this file with your new domain, you'll need to find your FTP credentials from your hosting provider.
Alternatively, you can install a plugin like File Manager to access your FTP directly in your WordPress Admin dashboard.
This option doesn't always work because you'll likely be unable to access your website after changing the URL path in step one.
Once you can access the FTP, go to public_html > wp-config.php, right-click the file, and select Edit. What you will see is:
define('WP_HOME','http://yoursitename.com');define('WP_SITEURL','http://yoursitename.com');
Change 'yoursitename' to the new domain name, then save.
Host your website on a fully managed and optimized infrastructure that scales with your business.
Go to your hosting control panel and find phpMyAdmin. Where you find phpMyAdmin on your dashboard will look different depending on your hosting service. I use Hostinger and can find phpMyAdmin under Databases.
Find wp_options, then select Edit on "siteurl" and "home."
Replace the old URL with the URL containing your new domain name.
Click Go to save.
It's time to ensure your old website is redirected to the new website. This step is important because it's almost impossible to track and replace your old domain name wherever it appears. Plus, it might take a while for your audience to adjust to your new domain name.
By redirecting the former domain, all roads lead to your new domain, even if visitors enter the old domain in their search engines or click the old URL.
Here's how to set up 301 redirects, as they are called:
#Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]
Since you want your website to continue to rank and attract organic traffic, you should notify search engines of the changes you've made to your domain.
Most of these search engines have different notification requirements. Google, for example, will require that you verify your new domain name. You can find Google's list of requirements and the Change of Address tool here.
Once you're done, these search engines can now direct search traffic to your new domain name.
Websites using WordPress.com are either free (as the website.wordpress.com domain extension indicates) or use WordPress' hosting service. On these WordPress sites, you typically have two chances to change your domain name - within and after the refund period.
The first chance to change your domain name is within 96 hours or four days (WordPress' refund window) of your domain registration. If you change your mind about your domain name within this period, you can cancel the domain and register a new one using the preferred name.
Here's how to do it:
Once that's done, cancel your current domain and register the new domain you want.
What if you want to change your domain name after the refund period?
Don't panic just yet. You still have options. You can
One of my favorite things about WordPress is its vast library of free and paid plugins. There's a plugin for almost all your needs. This is also true when backing up your website or redirecting your URLs.
Here are some popular options that can help you with these tasks and more as you handle your WordPress domain change.
Duplicator is a top-rated plugin for WordPress migrations and backups. I like that this plugin makes backing up my website easy. I can then seamlessly move my website to a new domain name.
This tool is especially helpful if you'll also be switching hosts during your domain change. Duplicator will download your entire WordPress site - plugins, themes, and all - into a .zip file as a backup or for simplified migrations with no downtime. You can then just upload the complete file to your new hosting site.
What I like: When the alternative is working page by page, Duplicator helps you save so much time.
The aptly named Redirection plugin makes light work of 301 redirects. In the past, I've had to create redirects myself. That was hours of tedious work that I could have used doing, well, anything else.
All you have to do is install and activate the Redirection plugin on your site. You can then navigate to the tool in the dashboard where you'll find an easy-to-use interface where you can manage redirects.
If you find other reasons for a redirect in the future, this plugin allows for conditional redirects, saving you even more time.
What I like: Redirection also tracks 404 errors to ensure your website isn't suffering in search rankings due to broken links, whether related to a domain change or not.
JetBackup Guard offers backup and restore functionality for your website's files. So, if your website crashes when you transfer your domain, you'll have a way to restore the information easily. I recommend using JetBackup or a similar tool to avoid losing your hard work.
If you upgrade to the premium version, Backup Guard will also handle migrating your website from one domain to another, making the process a piece of cake.
What I like: You don't need to use external libraries with this tool. Plus, it's specifically designed to help with large sites.
No matter the reason, changing a domain name can feel stressful. Even just finding a new domain can be a process in and of itself.
But with a little preparation and this guide on handling WordPress domain changes, you can have your new domain set up in no time - regardless of whether you do everything manually or install a plugin to lend you a hand.
Editor's note: This post was originally published in December 2020 and has been updated for comprehensiveness.
Host your website on a fully managed and optimized infrastructure that scales with your business.