How To Change Your WordPress Website’s Domain Name
We’ll state right off the bat that frivolously changing your domain name – especially on an established WordPress website – is not recommended. However, there are legitimate reasons for doing so, and if the need arises you’ll want to get the job done correctly.
Fortunately, the process is actually surprisingly simple if you’re just changing the primary WordPress URL. While you’ll need to alter some WordPress settings in two different locations, each will be a breeze to deal with.
This post will look at how to change your existing domain name within WordPress, and will also touch on some crucial pointers for doing so successfully. Let’s get started!
Why Would You Want to Change Your Domain Name?
It’s worth exploring some of the reasons you might change your domain. Here are a few common examples:
- You’ve changed your business name – Of course, if you change the name of your company due to an acquisition or shift in focus, you’ll want your website to change, too. When your domain name matches your business name, it’s easier for customers to find you.
- You’re rebranding – When looking to attract new or different clientele, you might consider an updated domain name that better reflects your image. A new name that meshes with your brand voice can also help with marketing efforts.
- You want to change your domain extension – Even if you only want to change your domain extension, you need to register for a new name. For example, if you started as a .org website but want to shift to a .com site URL to instill confidence, this guide is for you.
Do You Have to Purchase a New Domain Name?
Before you can migrate your WordPress site away from your old domain, you’ll need to purchase a new domain name. This process can be easier said than done.
First, you need to reserve your new domain name through a domain name registrar. While the cost is negligible (often less than $20/year), choosing an effective—and available—domain name for your brand can be time-consuming.
What’s more, if you’ve entered into a lengthy contract for your original domain, you may end up paying for two domains for a period. However, having both domains for at least six months is advisable, as customers may still try to visit your original site. You can redirect them from your old address to your new one using a 301 redirect.
Eventually, you’ll want to delete your original domain by canceling your plan. Remember that you’ll also have to update your WordPress URL on all social media platforms, business cards, signs, and other websites.
Now that you understand the details behind changing a domain name, let’s look at the WordPress change URL function.
How Do You Change Your Domain Name?
So, how do you change a domain name? As we said, changing your WordPress website’s primary domain name is not something you should do lightly. However, when you do find yourself in this situation, the process involves just a few steps:
- Access Access your WordPress dashboard, and change your website URL within the WordPress Settings > General screen.
- Update your wp-config.php file or wp config file to reflect the changes.
- Check that the domain change or domain rename has been correctly implemented.
The process itself is relatively simple, although there are some aspects that require a little technical knowledge. We’ll cover those in the next few sections, but don’t worry – we’ll walk you through each step.
Changing Your Domain in WordPress
Before you dive headfirst into changing your website’s primary domain name, you’ll want to keep a few considerations in mind. A little preparation is essential, to make sure the process goes as smoothly as possible. One mistake could bring down your entire website, but getting your resources and knowledge in order before you begin helps you avoid that scenario.
For instance, you’ll want to make you have a full backup of your website in place before lifting a finger. That way, if the worst happens, you can roll back your changes to a clean configuration and start over.
Also, you’ll need to use a File Transfer Protocol (FTP) client for some of these steps. This is a way to access your server directly from your desktop, and although it’s simple to use, there is a learning curve involved. As such, you’ll want to download a suitable client (we recommend FileZilla) and brush up on your FTP skills.
In addition, you’re going to need your server credentials to log in via FTP. These can usually be found within your hosting provider’s admin dashboard.
Finally, we’re assuming that you already have a custom domain name purchased, and you’ve gotten it ready by pointing it to the correct nameservers. If not, you’ll want to make sure this is sorted out before you do anything else.
How to Change Your Domain Name
Now that the prep work is out of the way, let’s get down to business! Here are the three steps you’ll need to follow in order to change your WordPress site’s original domain name.
Step 1: Change Your URL Within WordPress
Your first task is to physically change your site’s URL within WordPress. However, this step comes with a word of warning. Once you save your changes, your site’s back end won’t be accessible until you’ve completed the rest of this procedure.
To begin, log into WordPress, and navigate to the General > Settings screen:
This screen contains global settings for your WordPress site. The fields we’re interested in are WordPress Address (URL) and Site Address (URL):
For a WordPress change URL, simply type the new address into both of these fields, and click on Save Changes. As we mentioned, this will make your site temporarily inaccessible.
Step 2: Set Up Permanent Redirects and Notify Search Engines of the Change
This final step is more of a ‘clean-up’ job. Even once your domain is successfully changed, you’ll have a lot of links throughout your content and across the web that point back to your previous address. Fortunately, you can permanently redirect those links to your new domain.
To do this, you’ll need to once again access your site via FTP, and look for the .htaccess file. This is another WordPress configuration file (so it’s worth copying to your desktop as a backup before you tweak it). Within, you’ll want to add the following code:
#Options +FollowSymLinks RewriteEngine on RewriteRule ^(.*)$ http://www.example.COM/$1 [R=301,L]
Again, the placeholder WordPress URL address should be changed to reflect your new domain.
Once you’re done with that, the final task is to tell Google that you’ve updated your domain. The domain rename process is straightforward within Google Search Console, and will only take a few minutes.
Get Support for More Common WordPress Questions from WP Engine
Of course, a task as major as changing your domain name requires you to have confidence in your site – as well as your hosting provider. WP Engine is the market leader in reliable WordPress hosting, and what’s more, our support team is stellar!
There are many WordPress-related tasks you may not be sure how to approach, but help is at hand. We have a dedicated Resource Center packed to the roof with helpful articles (just like this one), which you can access whenever you need it. Check it out today!