Changing WordPress Domain - 3 Methods for a Safe Switch
Do you want to change your WordPress domain quickly and easily? Then this guide is for you!
- Reasons for a domain change
- 3 Methods to Change Your WordPress Domain
- Impact of domain change on your SEO
- Conclusion
- The best WordPress backup tools
New Year, new me - this resolution sometimes applies not only to oneself, but also to one's own WordPress domain. Because even if you already run an established website, the time may come when the change of your domain is inevitable. But how do you proceed most skillfully? What stumbling blocks need to be considered and what does this mean for your previous SEO measures? We will answer all these questions in our tutorial below.
We will only deal with changing the domain - i.e. the name under which your website can be found. If you also want to migrate your entire internet presence to a different Web hosting service, it is best to look at our guide to the topic Moving WordPress.
Reasons for a domain change
Before we talk about how, let's look at the why. Because a domain change is not always useful. So you should not change the name of your internet presence just for pleasure or because another designation now seems more appealing. Good reasons to change your WordPress domain are:
Rebranding: If your core business or image has now moved far from the idea behind your domain name, it may make sense to change it.
Corporate merger: The merger with another brand can also ensure that a domain change in WordPress is necessary.
Legal reasons: A less happy reason to change your WordPress domain could be if you commit a trademark infringement with your previous name.
Internationalization: Have you expanded so much that you are increasingly successful internationally? Then changing the domain can make sense to address customers in other languages.
Recommended SEO Tools
You can find more recommended tools SEO-Tools on OMR Reviews and compare them. In total, we have listed over 150 SEO tools (as of December 2023) that can help you increase your organic traffic in the long term. So take a look and compare the software with the help of the verified user reviews:
3 Methods to Change Your WordPress Domain
There are several methods to change your WordPress domain - depending on what access rights you have to WordPress. We will show you what you have to do individually in the following step-by-step instructions:
Method 1: Change WordPress domain via dashboard
The probably easiest method for a domain change at WordPress takes place in the dashboard of the Content Management Systems. In addition to access to the backend of your page, you also need admin rights.
Log into WordPress.
Once you are logged in as an admin in your backend, click on Setting -> General. There you will find the following settings:
Enter the desired address for your new domain in the fields WordPress Address (URL) and Site Address (URL). Then you click on Save Changes. Done!
Method 2: Change WordPress domain via wp-config.php
The method mentioned above does not always work. This is the case, for example, when the name of your domain is permanently programmed into the wp-config.php file of the WordPress page. Then the two fields WordPress Address (URL) and Site Address (URL) appear grayed out:
1. But don't worry, you can still change your WordPress domain. To do this, log in via FTP service on the server where your WordPress is located. Here you now navigate to the wp-config.php file. This is usually located in the root directory of your WordPress installation.
2. You can open the wp-config.php with the help of a text editor. Look for the following two lines that define what your domain is called:
define('WP_HOME','http://your-old-domain.com');
define('WP_SITEURL','http://your-old-domain.com');
3. Here you now change the information about the URL to match the new domain you want. Then you save the wp-config.php and upload it to your server.
Method 3: Change WordPress domain via php-database
Another method to change your WordPress domain involves editing the database. This is always necessary if you have installed additional plugins for your WordPress that refer to your URL. However, since the database is an important part of your website, you should definitely make a backup copy. To then change the domain, proceed as follows:
Log into phpMyAdmin and select your WordPress database. In the database, look for the table wp-options. This contains the options for your website, including the URL and the WordPress directory.
Look for the entries siteurl and home and edit the URLs stored here to match the new desired domain. Then save your changes.
Now the address references of your plugins have to be changed. This is easiest with free tools like Better Search Replace. Simply install this software for your WordPress and then use the search and replace function to update the entries for the domain.
Don't forget: Set up redirection!
The URLs have now changed and your new domain is ready to go - now it's time to set up redirects so the old links to your website don't lead nowhere. The Redirection tool can help you with this, with which you can quickly and easily set up redirects to your new URL.
Check new URL for 404 errors
Even if you have replaced all URLs and set up redirects, you should check your website for broken links at the end. Fortunately, the WordPress cosmos also has the right plugin for this: With the help of the Broken Link Checker, you can quickly find out if and which links on a domain show 404 errors.
Impact of domain change on your SEO
If the domain change is carried out carefully and thoroughly, the effects on your SEO efforts should be minimal. However, changing the WordPress domain is also associated with some risks. If mistakes are made during the move, this can negatively affect your ranking. Common sources of error or consequences can be:
Wrong or no redirects: If you have not correctly redirected all URLs, this will result in 404 error messages for your users. Search engines also notice these faulty pages and penalize your domain for it.
Duplicate Content: If the new URL is not stored everywhere, it may happen that your domain can be accessed via both the old and the new address. Search engines evaluate this as duplicated content, which can also lead to ranking losses.
Temporary ranking losses: Even if you have carried out the move completely, there may be temporary ranking losses. The reason: The search engine crawlers need some time to register all the positive signals that came from your old domain for the new URL.
Conclusion
Let's summarize: You should only change the WordPress domain if you have really good reasons for doing so - for example, if you are aiming for a rebranding of your brand. Then there are several methods available: The change of domain for WordPress can be implemented in its backend, via the wp-config-php file or in the database. The impact of this change on your ranking should be minimal - provided you make the change carefully and thoroughly. Therefore, always remember to make a backup of your website before making changes to the directories. We have already listed a few practical Tools for a WordPress backup for you below. We wish you good luck in moving your WordPress domain!