How to Change WordPress Domain? Step-by-Step Guide
Some projects need to change the brand name sooner or later. In this tutorial, we will show you how to change and buy WordPress domains and WordPress website.
![]() |
Why Do You Need To Change Your Domain Name?
Often times, the process of changing WordPress domains becomes unavoidable. The most common situations that require this action are:
Brand Name Change - you may want to refresh your company's image with a new brand name. A new domain name change shows the consistency of the strategy. Famous brands such as Twitter have implemented this marketing strategy with great success.
Domain Extension Change - if you have a website with a subdomain like my website.wordpress.com, or if you have a popular extension like .mobi or .shop that doesn't fit your audience, it might be a great idea to switch to a different extension!
How to Change WordPress Domain?
Most of the time, WordPress domain change is easy, but there will be some tasks that will require you to change your site's PHP code.
Remember that editing code can put your website at risk if it's not done correctly. Before changing your domain name, make sure you follow these prerequisites:
Make a full backup of your site. - Full backup helps you recover or restore your website in the fastest way if you encounter any problems. You can automatically back up your site with a plugin or your hosting provider's file manager.
hPanel or FTP client - if you want to change WordPress domains you will need to login to your Hostinger account and access your hPanel or use an FTP client.
A new domain name - you need to do a good research before making your final decision .
1. Get a New Domain
First of all, go to Hostinger's domain query tool and enter your preferred domain name. You will see if your chosen domain name is available and get some alternative suggestions.
Then add your domain name to the cart and proceed to checkout. Alternatively, if you buy Hostinger's annual Premium or Business web hosting plans, you can get free domain registration for the first year.
2. Change Website URL Using WordPress Admin Control Panel
The next step for WordPress domain change is to add your new domain to WordPress General Settings.
Go to Control Panel -> Settings -> General. Replace your existing WordPress Address (URL to visit your site) Site Address with your new domain name. Press Save Settings after you are done.
We're not done yet. Complete the following steps before accessing your site using the new address.
3. Update the wp-config.php File
You need to edit the wp-config.php file for the changes you make in WordPress settings to take effect. You can access this file using hPanel's file manager or FileZilla. For this example, we'll use the hPanel:
Go to hPanel -> Files -> File Manager.
Choose your domain name and Go to File Manager (Go to the File Manager) 'click.
Find the wp-config.php file in the public_html folder.
Right click and select Edit.
Replace http://yoursitename.com with your new WordPress domain name in the code snippet below. Then put this code in your file and press Save & Close.
Define (‘WP_HOME’, 'http://siteiname.com'
) ;
Define (‘WP_SITEURL’, 'http://sitenizinadi.com'
) ;
Your wp-config.php file should look like this:
If you prefer to do this using an FTP client, the process won't be much different. All you have to do is use your FTP account information to access your site's files.
4. Update Your Database
Next you need to update the database of your WordPress site:
Go to hPanel -> Databases -> phpMyAdmin .
Select the database of your WordPress files and click on phpMyAdmin.
On the phpMyAdmin page, select the wp_options file.
Click Edit in the site URL and home strings.
Replace the existing URL with your new file and click Go.
5. Forward Your Old WordPress Domain Permanently
The last step for WordPress domain change is to make a 301 redirect, that is, a URL from your old domain to the new one. In addition, thanks to the redirection, Google's PageRank will be moved and all the effort you spend on SEO will not be wasted while moving to the new domain.
We recommend that you keep your old domain active for a short time. This allows users to find you if they are not aware of the change in domain, and also allows search engines to recognize the change.
Now you will need to go to hPanel, edit the .htaccess file and create a 301 redirect:
Go to hPanel -> Files -> File Manager.
Choose your old domain and Go to File Manager (Go to the File Manager) 'click.
Find the .htaccess file in the public_html folder.
Right click and select Edit.
Http: //sitenizinadi.com Place the following code after the change to your new domain and Save & Close (Save & Close) 'Click.
#Options + FollowSymLinks
RewriteEngine on
RewriteRule ^ (. *) $ Http:
//yoursitename.com/$1 [R = 301, L]
Just like the step where you edit wp-config.php, this step can be done with an FTP client.
At the end we want to inform you that we are running very special WordPress services at cheap prices.
Result
There are many reasons to change your WordPress domain name. Luckily WordPress has built-in URL address settings and allows you to manually edit PHP code and change your domain name via a file manager or an FTP client.
In this guide, you have learned the steps to change a WordPress domain name. Here is a brief summary of these steps:
Buy a new domain.
Change your website address in your WordPress settings.
Update the wp-config.php file via hPanel or an FTP client.
Update your site's database.
Edit the .htaccess file to redirect visitors and search engines to your new domain name.

Comments
Post a Comment