Change Wordpress Site URL

=Introduction= The following are instructions for moving a Wordpress installation from one URL to a different one. There are two different cases for moving a Wordpress install, as shown below. The first case, is moving your WP site from a sub-directory to its parent domain. The second case is moving your Wordpress site from one fully hosted domain to a different one.


 * Case 1: Moving from a sub-directory the parent domain or vice-versa. Example: http://myAmazingSite.com/blog/ to http://myAmazingSite.com/


 * Case 2: Moving from one domain to a completely different domain name. Example: http://redApples.com/ to http://yellowBananas.org/

If case 1 applies to what you're trying to do, then you can skip ahead to the "Change the base URL set in your wordpress settings" section. Otherwise continue on to "Getting Started".

=Getting Started= Since Wordpress will only work properly on a domain that is Fully Hosted, you will need to make sure that the new domain you want to move your site to, is Fully Hosted in our system. In the above example (Case 2), I am moving my WP site from http://redApples.com/ to http://yellowBananas.org/, so I need to make sure that "yellowBananas.org" is fully hosted on my DreamHost account.

For more information, see How to set your domain to be fully hosted

I will also recommend that you set the new domain to be fully hosted under the same FTP user as the old domain. This will make it easier on you for one of the upcoming steps, moving the Wordpress files. =Change the base URL set in your wordpress settings= Wordpress relies heavily on a base URL to be able to properly load your media, pages,etc. So since we are moving the WP site to a different URL, we will also need to update the base URL set within your WP site's settings, to reflect the URL changes.


 * 1) Log into your Wordpress Dashboard.
 * 2) Navigate over to Settings > General
 * 3) Locate the "WordPress Address (URL)" and "Site Address (URL)". Please write down or note the EXACT URL listed for "WordPress Address (URL)", you will use this URL later :)
 * 4) Change the URL for both "WordPress Address (URL)" and "Site Address (URL)" to its new URL.
 * 5) Save your changes
 * 6) Logout your WP dashboard and close your browser's window. Do Not try to load the site just yet.

=Move the actual wordpress files=

This can be done via FTP, SFTP or SSH. Once connected, you can then move your site's Wordpress files from the old domain's web directory, to the new domain's web directory.

=Correct any broken paths= -- BEFORE YOU PROCEED -- please make sure to backup your database, since we will be making some changes that can potentially break things. Here is a link: How to backup your database

Now that you have moved your site's Wordpress files to the new domain's web directory, you can now try to load your site from the new URL. At this point, your site may look broken, as if the CSS and media files are missing. They are not missing, their URL's are just not correct (assuming you properly moved all the data over to the new domain's web directory). So the next step is to update those hardcoded URLs which are defined in the database. Here is a handy Wordpress plugin that can help you update all those URL paths:

http://wordpress.org/plugins/velvet-blues-update-urls/

Remember how I previously mentioned to write down or note the EXACT URL listed for ''"WordPress Address (URL)"' before you changed it to the new one'? You will use that URL that you wrote down with this plugin when it asks you to provide the "Old URL".