Skip to main content

Change WordPress domain

Updated over 3 months ago

Step 1: Install the plugin

  • Log in to your WordPress dashboard.

  • Go to Plugins β†’ Add New.

  • Search for Better Search Replace and click Install Now.

  • Activate the plugin after installation to start using it.

Step 2: Open the plugin

  • Once the plugin is activated, you will find a new menu item Better Search Replace under Tools in your dashboard.

Step 3: Set the search and replace parameters

  • Search for: Enter the text you want to replace (e.g., an old URL).

  • Replace with: Enter the new text that should replace the old entries (e.g., a new URL).

  • Select the database tables where the changes should be applied (e.g., wp_posts for posts and pages).

  • Optional feature: Run a Dry Run to see how many entries would be affected without making any actual changes.

Step 4: Perform the changes

  • After entering the search and replace values, click on Run Search/Replace to apply the changes.

  • Once the process is complete, the plugin will display a confirmation showing how many entries were changed.

Important tips:

  • Create a backup: Before making major changes, it is highly recommended to create a backup of your database.

  • Use cases: The plugin is especially useful for updating URLs after a domain change, refreshing outdated content, or fixing errors across multiple posts at once.

Step 5: Add domain alias and change main domain

After making the changes in WordPress, you need to add the new domain as an alias in MyPanel and then set it as the main domain:

  • Log in to My Panel and go to the Hosting section.

  • Then click on Settings.

  • Select the hosting subscription for which you want to change the domain settings.

  • Click on the desired website and choose Domain Aliases. Click Edit Aliases and add the new domain as an alias.

  • Once the domain alias has been added, go to the Domain Aliases section, select the new domain, and click Change Main Domain.

  • The new domain will now be set as the main domain.

Did this answer your question?