02 Aug

Change the URL of your WordPress Website

Sometimes you may need to change the URL of your WordPress website. If you attended one of our WordPress training courses for example and used a temporary URL.

This process is quite straightforward but you can break your site so proceed with caution and Backup your WordPress website first!

Your domain needs to be up and running and pointing to your existing website.

Step 1 – Backup your database!

There’s a separate guide on how to do this here

Step 2 – Install Better Search Replace Plugin

You can do this from your Plugins menu. The plugin is also available in the WordPress repository here.

Step 3 – Tell WordPress about the new URL

You can do this under Settings > General. You will need to set the Home URL and the Site URL which will usually be the same thing.

This will automatically update any internal links within menus, locations of featured images etc, but you will still need to replace the url where it is used within inline images or other content areas

Step 4 – Search and Replace your database

This bit is destructive – proceed with caution!

  • Open the Search and Replace plugin page from the Tools menu
  • Search for your old URL and replace with your new URL
  • Select the tables to search. Start with wp_options, wp_posts and wp_postmeta
  • You may wish to test with a dry run initially, if so leave the Dry run box ticked

If you need assistance changing the URL of your WordPress website, you can submit a WordPress support request here

Share this

Leave a reply