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.
Update All Internal And Hardcoded Links
Option 1 Kinsta Search and Replace Tool
If youre a Kinsta client, we have an easy to use search and replace tool in our MyKinsta dashboard.
Kinsta search and replace tool
Here are simple steps to update your old domain to your new domain:
Search and replace in WordPress database
Check out our search and replace tutorial for additional details. You can always reach out to our support team if you need assistance with this.
Option 2 Update Links With WordPress Plugin
Update your CDN
Edit The WordPressconfig File For Your New Site
After that, youll need to make some changes to the.config file. These are the steps to take in order to make changes to the wp-config.php file for WordPress:
The right database name, database user, and database password should now be shown in your wp-config.php file, as seen below. WordPress need this information in order to determine which database to use in order to retrieve the information.
Read Also: How Much Is A Domain Per Year
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
How To Change A Domain Name
Changing the domain name itself is a relatively straightforward task. For WordPress, change the domain by following these steps:
1. Log in to WordPress.
2. Go to Settings and select General.
3. Enter the new domain in the WordPress Address field.
4. Enter the new domain in the Site Address field.
5. Save changes.
Recommended Reading: How Much Does It Cost For A Domain Name
You May Like: How To Make An Email With Any Domain
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:
Reasons Why You Should Change Your Domain Name
- Your current domain name doesnt reflect your brand and business.
- Industries shift. Perhaps your domain name is no longer relevant or helpful in distinguishing your product and business in the marketplace.
Dont Forget To Backup Your Website Thoroughly
Nothing is worse than losing your all-important content just because of one silly mistake. It is very important to have a complete backup before migrating your website to other domain names. There are hundreds of hosting options for WordPress are available but not everyone offers complete website backup which is quite crucial while choosing the right option for your website.
There are many plugins available that will help you in backing up your website. Before you change the WordPress domain Cpanel makes sure to have a complete backup with all subdomain lists.
Create A Sql Database
This might sound hard but its pretty easy to do. We first need to make an empty database.
In Cpanel, look for the Databases section. Well use the MYSQL Databases section first.
- Click MYSQL Databases.
- Under Create New, type a short name for the new domain.
- Next, create a MySQL username. These names are arbitrary but I like to keep them fairly consistent to make identifying them easier. Make a password and click Create User.
- Next, add this user.
- Under Add User to Database, select the username you created in the last step. Select the new one and click Add.
Read Also: How To Tell Who Owns A Website Domain
Change Your Domain Name To Suit Business Needs
Having a domain name is important if you want to establish credibility with customers in the online space. Its an easy way to signal to shoppers what youre selling and to gain a foothold in your market. The edge you gain through landing that perfect domain name is well worth the time and money investments required.
Unfortunately, some people wind up with a domain name that accomplishes none of those things. As a result, they are forced to change the name. Fortunately, this process is simple: follow the steps listed above to land the perfect domain name.
Content Marketing Strategist working in the digital marketing industry. Skilled in SEO-focused content creation, keyword research and competitive analysis, interactive content, web content optimization, and landing page creation.
How To Change A WordPress Domain Name
Arent Facebook groups for entrepreneurs are fan-freakin-tastic? Thats where Ive found many of you guys, connected with some amazing ladies and gents and bounced ideas off people a lot smarter than me!
This week one of those helpful people pointed out that I cant use WordPress in my domain name because my biz doesnt meet the WordPress Foundations criteria for using the name.
If I wanted to run WordPress Ally as a non-profit I could keep the name And I love yall and stuff, but this girls gotta eat! Even though Im not charging you guys for my training, my site is monetized in other ways.
I dont know if WordPress ever would have tracked me down, but Im a total rule-follower so Im not gonna chance it.
I originally called this training Website Essentials Academy and it did not perform well. So I was pretty bummed because I put a lot of thought into naming WordPress Ally .
I chose WordPress Ally because I am ON YOUR SIDE. I dont want you to spend more money than you have to. I dont want you to spend more time than you have to. I dont want you to be frustrated trying to figure something out that Ive spent a ton of time figuring out and I can give you the shortcuts.
I had to go back to the drawing board on my name, and I was stumped. So I referred to the How To Name Things So They Sell Including Your Company, Your Products, Your Services or Your Dog chapter of Brandgasm 101 to get some clarity.
Read Also: Buying And Selling Domains For Profit
Also Check: What Is A Domain Registrar
Edit The Functionsphp File To Update The Database
This option is a temporary command and should not be used as a permanent solution. Use this method only when all other options have failed and/or your site is not accessible through the front end.
Add the following two lines of code directly after the < ?php line in functions.php and be sure to replace both instances of example.com with your target domain:
Upload the edited file to your site, and then log in to the admin page a few times. This will trigger an update of your options in the database. Once your site is functional, you should remove the two lines of code from the functions.php file. The database will remain updated.
If your WordPress theme doesnt have a functions.php file, you can create one by wrapping the two lines of code listed above in php tags like the following:
< ?phpupdate_option update_option ?>
The above code can be saved in a plain text file called functions.php and uploaded to your themes main directory. Youll want to log in to your admin panel a few times to trigger the command, and then remember to delete this file after your database has updated the options.
After changing the proper values using one of the options above, the domain for your WordPress website should now be changed.
Larry is an independent business consultant specializing in tech, social media trends, business, and entrepreneurship. Follow him on Twitter and LinkedIn.
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
Also Check: Why Is My Domain Name So Expensive
Reasons For A New Domain Name
There are many legitimate reasons for a new domain. Many projects will have to go under a new name and that means a new site address to match. Two of the most common scenarios are:
Rebranding: You can rebuild your companys image from the ground up and a new domain name will broadcast your improved look to the world.
Youve probably visited the old domain name called twttr, but everybody has accessed Twitter. The successful rebranding of prominent domains like this shows that change can be good.
Domain Extension Change: In some cases, your project may be running on a subdomain like mywebsite.wordpress.com or you may be using an extension like .mobi or .shop. These site addresses might not be resonating well with your audience.
Swapping to a different extension or new site address URL can breathe new life into your WordPress domain and make it even easier to reach a wider audience.
Create A New Site Clone Or Update Existing Site Address
Once you have a backup of your site, the next step is to update your WordPress URL and site address. There are a few ways you can approach this.
- Option 3 Update existing domain
Option 1 Create New Site/Account
Your first option would be to create an entirely new WordPress install with your new domain and then migrate your data over. You would then change the domain after the fact. Why this approach? Sometimes people prefer to leave their old site intact for a while as another backup. Or perhaps you are also moving to a new WordPress host in the process as well.
In this case, you would simply create a second site. If youre a Kinsta client you would want to add a new install and ensure that your new domain is set as the primary domain. You can then migrate a copy of your WordPress site over. Check out our in-depth tutorial using the WordPress Duplicator plugin.
Option 2 Kinstas Clone Feature
If youre a Kinsta customer, you could go an even easier route and to utilize our one-click clone feature. This allows you to instantly create a copy of your existing WordPress site into a second account.
Option 3 Update Existing WordPress URL and Site Address
The third and final option would be to simply update your existing sites WordPress URL and site address. You would still need to follow these steps, even if you created or cloned a new site above.
- WordPress Address : The address of your WordPress core files.
- Site Address : The address to reach your blog.
Recommended Reading: How To Make Own Email Domain
Change The Domain Name On WordPress Using Phpmyadmin
This section explains how to change domain name on WordPress from the database using phpMyAdmin.
In some cases you may need to perform this task from your server. For example, when you cant reach your site due a non planned domain change.
To begin, access your phpMyAdmin and on the left menu find wpX_options. Where X is your database identificator. Press it to show the relevant tables to change your URL.
When the tables show up, you will see two named siteurl and home, as shown in the screenshot below. Each of them has a pencil icon next to the Edit link. Press the Edit link of siteurl to change it.
On the box containing your old URL, remove it and type your new domain name. Then press the Go button to save changes.
Then, go to the previous screen and press the Edit button for home and repeat the previous steps replacing the old URL with a new one, and pressing the Go button to save changes.
Now your domain name is updated, but you still need to replace the old domain within your site content. Keep reading to know how to change the domain name on all your WordPress content.
Updating Links Of Your Website
Recommended Reading: How Do I Redirect My Domain Name To Another Website
Important Things To Consider
When it comes to changing your domain there are a few caveats and important things to remember.
If you are only changing domain names, then its recommended to keep the same URL structure. Example: olddomain.com/about-us/ to newdomain.com/about-us/. You can theoretically change names and structure at the same time, but generally, when it comes to SEO, the fewer changes the better. A domain change is already a pretty major change.
If perhaps your old site isnt using pretty permalinks , then it would probably be better to change to your new domain name first, wait six months, and then change the structure.
Kinsta spoiled me so bad that I demand that level of service from every provider now. We also try to be at that level with our SaaS tool support.
Suganthan Mohanadasan from @Suganthanmn
If your current site is running over HTTP, theres never a better time to migrate to HTTPS. This is slightly different than changing your entire URL structure and in the long run, youll reap the rewards. As of July 2018, Google Chrome started Other HTTPS benefits include encryption, better referral data, performance improvements with HTTP/2, and its even an SEO ranking signal.
You can easily migrate to HTTPS while changing domain names.
Indexing and Crawling
Dont be alarmed when you change your WordPress domain if you see a slight dip temporarily in traffic. This is normal as it will take a few weeks for Google to re-index and crawl your new URLs.