How do I move WordPress to another location (URL)?

This page is showing a generic answer.
To see a more detailed answer customized for you, type your domain name here:

If you use the powerful WordPress CMS software on your site, it’s possible to move it from one location to another, but you have to do it a certain way. This page explains several different possibilities.

Before making any changes, you should make an extra backup of your Web site.

On this page:

The simplest case: Moving a WordPress directory up to the top level of the same site

If you’ve installed WordPress in a directory, and you want to move it to the top level of the same site, WordPress offers a shortcut for this.

The shortcut allows you to keep most files in the lower level directory, and is explained in the “Final step” section of our Testing WordPress page.

Moving WordPress to a different location on the same site

If you’re moving WordPress to a different location on the same site, but not to the top level (or you don’t want to use the shortcut described above to do so), you’ll need to move all the WordPress files.

WordPress has instructions on their web site explaining one way to do this. Their instructions should work if you want to use them. The WordPress instructions assume that you will make the necessary changes before you move the files on your web site.

Here is a simplified summary of the process discussed in the WordPress documentation:

  1. Before you move the files, login to the WordPress administration dashboard at the old location.
  2. Click Settings.
  3. Change the WordPress Address (URL) to the new URL that you want to use.
  4. Change the Site Address (URL) to the same value.
  5. Click Save Changes.
  6. Logout of your blog.
  7. Move the WordPress files to the new location using an FTP program, shell connection, or some similar method.

If you’re a customer of ours and you’re unable to move the files yourself, contact us and we can do it for you (this may take up to one business day).

If the instructions above didn’t work, there’s another way to do it using the phpMyAdmin Web interface. This way is more complicated, but it has one big advantage: it works even if you’ve already moved the WordPress files. It can also fix problems if you tried the WordPress instructions and something goes wrong.

  1. Login to your WordPress database using phpMyAdmin.
  2. Click wp_options in the list of table names in the left-hand column.
  3. Click the Browse tab along the top of the page.
  4. Locate the row where option_name is siteurl and click the Edit icon in the second column (the pencil icon).
  5. Edit the option_value to specify the new URL for the blog. This value should not end with a slash or a filename (in particular, it shouldn’t include “index.php”). For example, you might type http://example.com, http://www.example.com/blog, or http://blog.example.com.
  6. Click Go to save your changes. This should return you to the page showing you the first 30 records of the wp_options table; verify that your change was saved.
  7. Find the record where option_name is home. It will probably be on page 2, which you can get to by selecting 2 from the Page drop-down list, or by clicking on the > button.
  8. Click the “pencil” icon to edit that record.
  9. Change the option_value to the same URL you used for the siteurl above.
  10. Click Go to save your changes. Verify that your change was saved.

When you’ve made these changes, you should be able to view your blog using the new URL.

Changing the “aliased” domain name WordPress uses

If your WordPress site already also has an alias domain name pointing to it, and you want WordPress to start using the alias domain name instead, you can simply update things in the WordPress dashboard:

  1. Click Settings.
  2. Change the WordPress Address (URL) to the new URL that you want to use.
  3. Change the Site Address (URL) to the same value.
  4. Click Save Changes.

Moving WordPress to a different server

If you want to move WordPress to a completely different server (such as when you’re transferring a WordPress site to our company), you’ll need to actually export the WordPress data from one copy of WordPress to another.

The “simple” way to do this is to use the built-in WordPress export tool: First export the data from your old copy of WordPress to a file on your computer, then create the new empty copy of WordPress and import the data from the file you exported.

However, if you use the built-in tool, you’ll find that it only copies your site content: it doesn’t copy your theme files, plugins, settings, and so on, and you’ll have to reconfigure those.

If you want to copy over everything in one step instead, we have a page explaining how to use the WordPress Duplicator plugin to make an exact copy of an existing site.

Updating .htaccess (WP Super Cache users)

If your WordPress site is using WP Super Cache (as we recommend), the WP Super Cache settings may need to be updated after moving WordPress. To do so:

  1. Login to the WordPress administration dashboard.
  2. Click WP Super Cache (in the Settings section).
  3. Make sure the Advanced tab is selected.
  4. Scroll down a bit and click on the Update Mod_Rewrite Rules button.

Then test your blog to make sure it's working correctly.