Import The New Database File To New Database
Now that you have your new database, go back to your cPanel dashboard and find the phpMyAdmin option:
On the next screen, select the new database that you just created and then click Import:
Upload the .sql.gz that you got from WP Migrate DB and hit Go:
And now you have a version of your database that reflects your new domain! All thats left is to go into wp-config.php and tell your WordPress site to use this new database.
Before We Get Started
Its important to know that:
This guide is not for moving a WordPress site to a new web host. The process for that is different. Ill show you how to do that in a separate tutorial
Also. When you change your domain name it will temporarily affect your SEO rankings.
This is normal and to be expected!
It takes time for Google to adjust to the domain change, during which time, chances are, you will likely get less search traffic for a short time.
But dont worry
Why Change Domain Names
There are many reasons for wanting to change, perhaps you dont like your domain name, or maybe youve had feedback that your customers dont like it.
So, what happens if a name just isnt working for you anymore?
There are benefits of domain name changing. You might be able to get your hands on a shorter and more memorable domain name one thats marketable, modern, and appeals to your customers.
Lets take a closer look at four reasons you might want to switch names.
Reason 1. You want to rebrand
Maybe your company was bought and you need to undertake a domain name change, or a brand agency recently swept you off your feet, resulting in a company name change, and therefore a pressing need to change your domain name?
Perhaps you own a company that sold blue dog collars and registered for the name billsbluecollars.co. After a short while, you start to realize that red collars are more popular. You no longer want that .co domain, you want a .com, and to revamp your domain name entirely.
Its perfectly understandable that if a complete overhaul and fresh design are happening, you might need a new domain to match.
Reason 2. Youre relocating
Imagine youre an actor. An exciting move from a small US town to Toronto in Canada might mean that your acting portfolio website needs to change from a .us to a .cato reflect your availability.
Reason 3. Your business has changed
Reason 4. Your dream domain name is up for grabs
Read Also: How Much Should I Offer For A Domain Name
Create The Addon Domain
In your web hosting cPanel, create an Addon domain. Enter the new domain name youve chosen for your website.
Every cPanel is different but they share similarities in how they name the important features. Look for AddOn or Add-On Domains.
Click the Addon button and type the name of your new domain.
Return to the cPanel main area and open File Manager. Check that the folder has been created. Check under the public_html folder or the Web folder. Once you verify that the folder exists, move on to the next step
Update Google And Bing
Now that you have your old domain routing requests to your new domain, its time to update your web properties with and Bing Webmaster Tools. If you never set these up for your olddomain.com, go ahead and create them, verify them, and repeat the steps for your newdomain.com. Then follow the steps below. You should have four properties in total between Google Search Console and Bing Webmaster Tools .
Change of Address in Google Search Console
In Google Search Console you will want to do what they call a change of address. This is very important as it lets Google know instantly that everything is changing. So dont skip this step! You will need a verified property for both your old domain and new domain.
Simply click into your old domains profile, click on the gear icon in the upper right-hand corner, and select Change of Address. Then follow the remaining prompts.
Change of Address with Google Search Console
The Change of Address tool is currently only available in the new Google Search Console.
If your site is only in the . You can easily add it again using the URL prefix method and then you can access your site in the . They will most likely move this tool over to the new GSC eventually.
Google Search Console URL prefix
Site Move in Bing Webmaster Tools
Just like Google Search Console, Bing Webmaster Tools has the same type of process called Site Move. And again, you will need a verified property for both your old domain and new domain.
Upgrade Bing And Google Properties
After following the above steps carefully on how to change domain name in WordPress site. The next important step is to update your existing web properties including both Bing and Google webmasters.
In Google Search Console, click on the change of address option available in the navigation bar. It is important to let Google know about every single change that happens within your website. Do not skip this step and verify both old as well as new domain property.
Tell Google About The Domain Change
To let Google know about the domain change you need to do a change of address inside Google Search Console.
Doing this will help Google quickly find your new domain and show it in the search results.
If you dont already have a Google Search Console account, create one. Add both domains and verify them.
If you do already have an account for your old domain, add a new property for the new domain and verify it.
Then, in the left sidebar
- Select your old WordPress URL
And to the right of the screen
- Select Change of Address
- Choose your old WordPress URL
Finally, Google Search Console will perform a quick validation test and process your request if no errors are found.
I hope this tutorial has helped you learn how to change WordPress domain name. If you have any questions, let me know in the comments box below.
Change WordPress Url With Wp
A fourth option is to use the WordPress Command Line Interface to access your site and edit the URL.
Tired of subpar level 1 WordPress hosting support without the answers? Try our world-class support team! Check out our plans
Youll need SSH access to your site and youll need to be familiar with the process for accessing your site using WP-CLI.
If you are unfamiliar with WP-CLI you can check out our in-depth post on managing WordPress from the terminal.
The commands to edit your URL are as follows:
wp option update home 'http://yoursiteurl.com'wp option update siteurl 'http://yoursiteurl.com'
What To Know Before You Create A New Domain Name
Changing your WordPress domain name is simple, but there will be the occasional need to adjust your websites PHP code. This code is essential to the operation of your website and mistakes made there could bring your domain to a halt. Some quick prep work before you start will guarantee the process goes smoothly.
- Before doing anything, create a full backup of your website. Do this either manually by exporting your database or by using one of many backup plugins. Some reliable options are Updraftplus, BlogVault, and VaultPress.
- Buy and Register your new Domain name by pointing it to the correct name servers.
- Have a File Transfer Protocol client. The FTP will allow you to access your server directly from your computer. Theyre easy to use, but be prepared for some learning curve. We recommend FileZilla, a great FTP for beginners to brush up their FTP skills.
- Head to Hostingers Domain Checker and type in your preferred new domain name. The checker will tell you if that option is available and it will offer some alternative suggestions in case that domain is already taken.
Clone WordPress Site To New Domain Name
To restore the backup on your new domain name we will use the clone feature in ManageWP.
Login to your ManageWP account.
Choose New Website as the destination.
Enter your WordPress address URL as the Destination Site URL and click the Test URL button.
Your FTP host information will be prefilled for you.
Enter your FTP username and password. This is usually the same as your cPanel credentials. If youre unsure, contact your hosting provider for help.
Leave the Port as 21 and enter an Installation path. This will likely be similar to mine as seen in the screenshot below. Just change my domain name to yours.
Now copy and paste the database information that you saved in the previous step. Once done, click Test Connection.
Assuming the test is successful, click the Save Connection Info button to continue. Click Clone.
To complete the process, youll see a message asking you to confirm. Click Clone.
ManageWP will now use the backup made in step one to clone your WordPress website on your new domain name.
Depending on the size of your site, the process may take several minutes. Grab yourself a drink while you wait.
When its done, you will see a success message.
Congratulations! You have successfully moved your WordPress website to a new domain name.
But youre not finished yet!
We need to setup a 301 redirect from the old WordPress address URL to the new site address URL.
This is important for SEO and readers because:
WordPress Domain Name Change
Changing the domain name of a WordPress site is easy and shouldnt take a long time if done correctly. However, if you are not careful during this process, you may end up making your site inaccessible. This is why it is good to make a full backup of your files and database before making any major changes.
Now lets start the steps of changing the domain name of your WordPress site!
Add An Ssl Certificate To Your New Domain
We strongly suggest that you purchase or acquire a free SSL certificate beforehand. You can do it later, but then youd have to change http:// to https:// in steps 5, 6, 7, 8, and 9, which is just extra work. Doing this will improve your SEO, boost security on your new domain name, and let visitors enter login credentials or personal information safely. After you finish with the rest of the steps, force SSL in WordPress.
Setup A Permanent 301 Redirect
Now that youve successfully changed to your new WordPress domain name, but what if someone visits the old one? Will they just see a blank page? You dont want to lose even a single visitor. We recommend keeping your old domain active for a while to allow users and search engines time to recognize your new home.
But thats only a temporary solution. The long term fix to guarantee that no traffic gets lost during your rebranding efforts will be to set up a permanent 301 redirect from your old domain to the new. This will help you optimize your website for search engines and users alike by redirecting anyone who lands on your old website, sending them instead to your new one. Heres how:
- Log into your cPanel
- Click on the File Manager
- Open your website folder.
- Go to the .htaccess file and click on Edit.
- Go to cPanel> Files> File Manager
- Select your old domain and click Go to File Manager.
- Find the .htaccess file in the public_html directory and right click it
- Select Edit
- Insert the following code, after replacing http://yoursitename.com with your new domain, then press Save & Close.
If you need to put the code in the wp-config file to change the site address or domain name, do the following:
How To Change Your Domain Name
Im going to assume that youve already purchased a new domain name and added it to your web hosting account.
If not, I recommend NameCheap. Thats where I get all my domain names. Support is outstanding and prices are amongst the cheapest online.
When you have your domain, youll need to update DNS settings and add it to your web hosting account. Your web host will have a tutorial on how to add a domain.
Upon completion, follow the steps below to change WordPress URL.
Redirect The Former Domain
It’s time to ensure your old website is redirected to the new website, as audiences might still stumble upon your old URL or forget that you’ve changed to a new domain. By redirecting, they can type in the old domain and still end up on your new domain.
To set up these 301 redirects, as they are called, go to your hosting control panel and choose the file manager. Go to the .htaccess folder, and right-click to edit. Add the following code, changing newdomain’ to your new domain, to the top of the page:
#Options +FollowSymLinksRewriteRule ^$ http://www.newdomain.com/$1
Search And Replace Broken Links
At this point, your old domain name redirects to the new one, and you suggested that search engines treat your new domain name as canonical. However, it can take up to 6 months or more for the transition to finalize. The first way to speed that up while improving SEO and user experience is to find and fix broken links that might have remained behind.
Back Up Current WordPress Site
The very first thing you should do before changing your WordPress domain is to back up your current site. This way no matter what happens, you can always revert if needed.
Option 1 One-Click Backup for Kinsta Clients
If youre a Kinsta client, you can simply use our simple backup tool in your MyKinsta dashboard. Select your site in the Sites section and click on the backups tab. Youll see a list of your available backups. Simply click on Back up now, choose a backup name , and it will create an additional backup/restore point.
Create WordPress backup
You can then restore your backup at any time with a single click.
Option 2 Back up Your Site With a WordPress Plugin
You can also back up your WordPress site with a third-party plugin. We always recommend utilizing those that have incremental backup options. Even though you probably wont need the incremental feature for this tutorial, these are the ones you should familiarize yourself with or invest in long-term, as the incremental feature decreases server load, disk space, and helps improve reliability. Here is a list of recommended plugins:
Or if you just want a one-off backup, you can use the free Duplicator plugin and create a local archive backup.
Create WordPress backup with the Duplicator plugin
Option 3 Back Up Your WordPress Site Manually
WordPress wp-content folder
Create manual WordPress backup