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 website.

On this page:

Moving WordPress to a different location on the same site

If you’re moving WordPress to a different location on the same site, you’ll need to move all the WordPress files.

The instructions below explain how to do this if you’re comfortable moving files on your site. If you’re a hosting customer of ours, we’ll be glad to do this for you at no charge within one business day if you don’t feel comfortable with it: just contact us.

For the sake of this example, let’s assume that you’ve installed WordPress in a folder such as “”, and you want to move it to the top level of the same site (“”).

Although WordPress has instructions on their web site explaining how to do this, we recommend that you follow our instructions instead:

  1. Before you move the files, login to the WordPress administration dashboard at the old location (e.g., “”).
  2. Click Settings.
  3. Change the WordPress Address (URL) to the new URL that you want to use (e.g.,
  4. Change the Site Address (URL) to the same value.
  5. Click Save Changes.
  6. You’ll probably see a “404 Not Found” error page because WordPress no longer knows it’s at the old location. This is normal and can be ignored.
  7. If you’re moving the WordPress files to a location that already contains an index file such as “index.html”, “index.htm”, or “index.php”, you’ll need to move or rename the old file so the web server sees the WordPress files. We recommend moving all the existing site files into a folder called something like files-before-wordpress-move, which will also prevent them from being visited via outdated search engine links.
  8. Move the WordPress files to the new location using a shell connection, FTP connection, or some similar method. To make it go quickly, be sure to move the files instead of copying them.
  9. Login to the WordPress dashboard at the new location (e.g., “”).
  10. Click Settings, Permalinks, then click Save Changes without actually making any changes. (This step is necessary to update the .htaccess file with the correct “RewriteBase” rule.)
  11. Optional, but recommended to ensure any stray links to the test location take visitors to the new location: Edit the file named .htaccess at the top level of your site. Add lines to the top of the file to redirect all requests from the old location to the new one, such as these lines if you move “/wordpress” to the top level:
    RewriteEngine On
    RewriteRule ^wordpress(/.*)?$$1 [last,redirect=301]
  12. Clear your browser cache and test your site.

These steps will make most WordPress sites fully work.

Updating hard-coded links

After moving your site, you may find that some existing menus or posts contain hard-coded link URLs that mention the old location.

Adding the “RewriteRule” described above should make these links work, but some people find the references to the old URL cosmetically annoying or confusing.

If you want to update them, we recommend doing this:

  1. Be sure you've made an extra backup of your website.
  2. On the new site, click Plugins / Add New.
  3. Search for: Velvet Blues Update URLs
  4. Install and activate the plugin
  5. Click on Tools / Update URLs and follow the directions.

(We’ll do this for you if you ask us to move WordPress.)

A small number of plugins and themes store the “full disk path” to the old location, causing them to stop working unless they’re reconfigured after the move.

Technically advanced users who are comfortable with the shell can solve this by adding a symlink that points the old disk location to the new one, using a command like ln -s ./ wordpress.

Symlinks can be confusing and cause their own problems — in particular, if you later try deleting the symlink from some FTP programs, the program may delete the contents of the folder the symlink points to, which will be your real files. Because of that, we don’t recommend doing this except as a last resort to fix problems with plugins that are very difficult to reconfigure in a more normal manner. (We won’t do this by default if you ask us to move WordPress.)

Changing the preferred domain name alias WordPress uses

If your WordPress site has a domain name alias pointing to it, and you want WordPress to prefer the alias domain name in links that it generates, you can update the domain name 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.

We have a page that describes a few different ways to do this, with recommendations on when you should use each approach.

Updating .htaccess (WP Super Cache users)

If your WordPress site is using WP Super Cache (as we recommend) and is using the mod_rewrite method, 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.

Fixing your site if you can’t login

If something is wrong with your WordPress configuration and you find that you can’t login to the WordPress dashboard, you can fix it by following these instructions.