There have been many inquiries from users who are unhappy with their url and site addresses and want to know how to change the domain name on WordPress.
This article will offer step-by-step instructions on how to change to a new domain name on any WordPress website.
Seasoned developers can readily change their site address, but it’s a fundamental skill that will benefit all users.
Though changing to a new domain name on WordPress-powered sites is a common request, nevertheless it can potentially damage the internet presence you’ve worked hard to build.
So while change is good, be cautious if you own an already well-established WordPress website.
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 company’s image from the ground up and a new domain name will broadcast your improved look to the world.
You’ve 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.
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 website’s 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 (FTP) client. The FTP will allow you to access your server directly from your computer. They’re easy to use but be prepared for some learning curves. We recommend FileZilla, a great FTP for beginners to brush up on their FTP skills.
- Head to Google Domains and type in your preferred new domain name. The checker will tell you if that option is available and it will offer some alternative websites name suggestions in case that domain is already taken.
How to Change The Domain Name On WordPress
To make use of your new domain, add it to your hosting through the cPanel.
- In the cPanel click on the Addon Domain
- Enter your new domain address, subdomain, and document root.
- Click Add Domain.
- Either download your backup file or directly copy your previous folder to the new domain folder.
- If you’re migrating to a new hosting service follow these instructions to download your backup and add it to your FTP using your cPanel.
- Inside the cPanel go to your Dashboard > Settings > General.
- Replace your current WordPress Address (the URL used to visit your site) and Site Address (the URL of your core files) with your new domain.
- Hit Save Changes to finish.
- Open your new domain folder.
- Edit the wp-config.php file and define the site URL and homepage for your new domain. This will reflect the changes you’ve made in the WordPress settings. Access your wp-config.php file from the cPanel file manager or by using FileZilla.
- Go to cPanel > Files > File Manager
- Choose the domain and click Go To File Manager
- Locate the wp-config.php file in the public_html folder
- Right-click and select Edit
- In the following snippet, replace http://yoursitename.com with your new WordPress domain name, then insert it into the file and press Save & Close.
You can use the following code:
define('WP_SITEURL', 'http://newdomain.com'); define('WP_HOME', 'http://newdomain.com');
Setup a Permanent 301 Redirect
Now that you’ve successfully changed to your new WordPress domain name, but what if someone visits the old one? Will they just see a blank page? You don’t 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 that’s 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 one.
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. Here’s 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:
- Log into your WordPress Admin Dashboard
- Navigate to Settings > General
- Under general settings find two fields named WordPress Address URL and Site Address (URL)
- Change the old domain name to the new one
- Click Save Changes to finish the process.
Using plugins to help you with the domain change
Do you need help with website backups or URL redirection? I’m sure you can find a plugin to solve your problem. Here are several widely used choices that can assist you in changing your WordPress domain and doing the stated actions.
When it comes to moving and backing up WordPress sites, Duplicator is widely considered the best option. If you’re also switching hosts alongside your domain shift, this tool will come in extremely handy for backing up and transferring your website.
When you use Duplicator, your whole WordPress installation, including all of its plugins and themes, will be downloaded as a single.zip file, which you can then use as a backup or to facilitate a seamless, interruption-free migration.
You may back up your website’s files with Backup Guard, another choice for backups and migrations.
If you purchase the pro version of Backup Guard, the procedure of moving your website to a new domain will be handled automatically, saving you time and stress.
Update your domain name with Google Analytics and other tracking tools
Your Google Analytics profile must be updated next. Google Analytics is the most popular and effective free service for analyzing site traffic, user behavior, and conversions.
If you go to “Admin,” then “Property Settings,” then “Default URL,” you can easily change it.
Changing an existing property is preferable to starting from scratch because it facilitates future comparisons of traffic and historical data (particularly if the URL structure is maintained).
FAQ on Changing the Domain Name on WordPress
How Do I Go About Changing My Domain Name in WordPress?
Alright, let’s dive straight in. You’ve gotta start in your WordPress admin area. Navigate to ‘Settings’, then ‘General’. Here, you’ll spot two fields: ‘WordPress Address (URL)’ and ‘Site Address (URL)’. Update these with your new domain.
But hey, don’t just hit save and call it a day. You gotta update your DNS settings to point to your new domain. And remember, it can take a bit for those DNS changes to kick in. Patience is key.
Can I Change My WordPress Domain Without Losing Content?
Totally, you can switch domains without tossing your content out the window. It’s all about keeping your files and database snug and safe.
Before you even think about making the switch, back up everything. Once you’ve got your new domain, it’s a matter of updating the WordPress Address and Site Address, plus a bit of database tweaking if needed. Your content stays put; only the address changes.
What’s the Best Plugin to Help Change My WordPress Domain?
Plugins make life easier, don’t they? For changing your domain, ‘Duplicator’ is a lifesaver. It clones your site, making it a breeze to migrate to a new domain.
Another ace up your sleeve is ‘All-in-One WP Migration’. It’s like packing your entire site into a moving van and unloading it at your new domain. Easy-peasy.
Is There a Way to Redirect My Old Domain to My New One in WordPress?
Redirects are your best friend in this game. You don’t want your visitors lost in no man’s land. In your .htaccess file, you can set up a 301 redirect.
This little piece of code tells browsers, “Hey, we’ve moved permanently, follow us this way.” Update it with your new domain, and voilà, visitors and search engines will be guided to your new site.
Will Changing My WordPress Domain Affect My SEO?
Not gonna sugarcoat it, changing your domain can shake up your SEO. But it’s not all doom and gloom. Proper redirects can preserve your SEO juice.
Notify Google about your domain change through Google Search Console. This helps maintain your rankings. Keep a close eye on your SEO metrics during the transition. It’s like a tightrope walk, but with careful steps, you can cross without tumbling.
How Do I Update My Domain Name in the WordPress Database?
Sometimes, you gotta roll up your sleeves and dive into the database. You’re looking for ‘wp_options’. Within this table, you’ll find two rows: ‘siteurl’ and ‘home’.
These need to reflect your new domain. It’s precision work, like defusing a bomb. One wrong move, and your site goes poof. So, double-check your entries before saving.
After Changing My Domain, How Do I Update All Links on My WordPress Site?
Imagine moving to a new house and leaving your address unchanged everywhere. Chaos, right? Same deal here.
Tools like ‘Velvet Blues Update URLs’ or ‘Better Search Replace’ can sweep through your site and update all your internal links. They’re like your moving crew, ensuring everything ends up in the right place on your new domain.
Can Changing My WordPress Domain Name Cause Downtime?
Yep, it’s possible. Think of it like flipping a switch. There’s that moment of darkness before the lights come back on.
DNS propagation, the time it takes for your new domain to be recognized worldwide, can take up to 48 hours. During this, some visitors might land on your old domain. Minimize this twilight zone by planning the change during low-traffic periods.
What Happens to My Old Domain Emails After I Change My WordPress Domain?
Emails tied to your old domain can end up like letters sent to a deserted island. To avoid this, set up email forwarding from your old domain to your new one. Communicate the change to your contacts. It’s like leaving a forwarding address at the post office. Don’t leave your emails stranded!
How Much Does It Cost to Change My WordPress Domain Name?
The price tag isn’t just the new domain; that’s the tip of the iceberg. If you’re hiring help for the technical stuff, that’s an extra. Then there’s potential SEO support to keep your rankings afloat. Don’t forget the time you’ll invest. It’s not just about the dollars and cents; it’s the time and effort, too. Think of it as an investment in your brand’s future.
Reviewing How to Change the Domain Name on WordPress
Changing your WordPress domain name is a common problem, but the built in solutions offered for your WordPress site mean it is achievable.
In this tutorial you’ve learned how to manually tweak the URL address settings and PHP code through a file manager or FTP client to cleanly change your domain.
Here’s a quick recap:
- Perform a full website backup
- Purchase and register a new domain
- Add the new domain name and restore the site’s backup
- Change website address in WordPress settings
- Update wp-config.php file
- Update site database
- Redirect visitors and search engines to your new domain.
Seven steps is all it takes to learn how to change the domain name on your WordPress site, but there are many other tools and features to master on WordPress. Our many other guides will make you an expert on all things WordPress.
If you enjoyed reading this article on how to change the domain name on WordPress, you should check out this one about how to hide the author in WordPress.
We also wrote about a few related subjects like creating a comparison table with WordPress plugins, how to scan the WordPress database for malware, how to upload an HTML file in WordPress, where are WordPress pages stored, and how to delete WordPress themes.