How to remove domain from wordpress

Last Updated: Jan 25, 2024 by

If you are a WordPress user, you may have come across the need to remove a domain from your website. This could be due to various reasons such as changing your domain name, moving to a new hosting provider, or simply wanting to remove an old domain. Whatever the reason may be, removing a domain from WordPress is a simple process that can be done in a few easy steps.

Backup Your Website

Before making any changes to your website, it is important to always backup your website. This ensures that you have a copy of your website in case anything goes wrong during the process. You can use a plugin like UpdraftPlus or manually backup your website through your hosting provider.

Remove Domain from WordPress Dashboard

Remove domain from wordpress

by Sina Katirachi (https://unsplash.com/@sinaktc)

The first step to removing a domain from WordPress is to log into your WordPress dashboard. Once logged in, go to “Settings” and then “General”. Here, you will see your current domain name listed under “WordPress Address (URL)” and “Site Address (URL)”. Simply replace the current domain name with the new one or leave it blank if you want to remove the domain completely. Click “Save Changes” to apply the changes.

Update Your Database

The next step is to update your database to reflect the changes made in the previous step. To do this, you will need to access your website’s database through phpMyAdmin or a similar tool provided by your hosting provider. Once in the database, look for the “wp_options” table and click on it. Here, you will see two rows named “siteurl” and “home”. Edit these rows and replace the old domain name with the new one or leave it blank to remove the domain completely. Save the changes and exit the database.

Update Your Permalinks

After updating your database, it is important to update your permalinks to ensure that all your website’s links are updated with the new domain name. To do this, go to “Settings” and then “Permalinks” in your WordPress dashboard. Simply click “Save Changes” without making any changes to update your permalinks.

Test Your Website

Once you have completed all the steps, it is important to test your website to ensure that everything is working correctly. Check all your pages, links, and images to make sure they are loading properly with the new domain name. If you encounter any issues, you can always revert back to your backup and try again.

Redirect Old Domain

If you are removing a domain because you have changed your domain name, it is important to set up a redirect from the old domain to the new one. This ensures that anyone who tries to access your website through the old domain will be automatically redirected to the new one. You can set up a redirect through your hosting provider or by using a plugin like Redirection.

By following these simple steps, you can easily remove a domain from your WordPress website. Remember to always backup your website before making any changes and test your website after completing the process. Have you ever had to remove a domain from WordPress? Let us know in the comments.

Moadood Ahmad

About the Author: Moadood Ahmad

Leave a Reply

Your email address will not be published. Required fields are marked *