Join 3,524 readers in helping fund MetaFilter (Hide)


Move a Wordpress blog to a new URL?
June 26, 2010 9:46 AM   Subscribe

How can I move my self-hosted Wordpress blog from one domain to another?

I have a web hosting account at one domain (let's call it www.domainone.com). I installed Wordpress and am blogging at that domain. I have another domain (let's call it www.domaintwo.com) that redirects visitors to www.domainone.com and my blog there.

But I want my blog to be at www.domaintwo.com, which just has a more professional and grown-up sound to it. Is there a relatively easy way to move my Wordpress installation and the blog and all the info to www.domaintwo.com?

Alternatively, is there a way to make my blog seem to be on www.domaintwo.com? I'd be content to go with that solution until my hosting account at domain one expires, at which time I'd like to let that domain go and just keep domain two and have everything be there. Thanks!
posted by toomuchkatherine to Technology (8 answers total) 6 users marked this as a favorite
 
There are 2 parts to moving a WordPress blog: moving the files and moving the data. Transferring the files are straightforward enough. Using FTP or whatever just move over a copy from the old server to the new.

You ought to be able to use Tools-->Export and Tools-->Import to get your data out of the old install and into the new.

I'd start by putting a clean install of WordPress on the new host, and the uploading the old install into that. This will take care of getting the initial database piece in place, and will let you have something in which to import the old data.
posted by john m at 9:57 AM on June 26, 2010


Do you have the ability to setup a virtual directory on domaintwo? I'm not sure if you're using IIS or how it's managed but you should be able to simply mask domainone with domaintwo so that they both point to the same source of data, but the user still sees domainone or domaintwo in their address bar. We've done this at my company by directing all domain.com/blog/ properties to the same wordpress installation (so domainone.com/blog, domaintwo.com/blog, etc.com/blog all show the same data, but the user sees that it's still the original domain they went to instead of being redirected.
posted by msbutah at 10:21 AM on June 26, 2010


Usually what I do is:
1. Install Wordpress at second location
2. Install any necessary plugins
3. Copy over the theme folder
4. Export from site 1, import to site 2. Importing will also include images
5. Make sure any customized settings (like permalinks) are the same.
posted by beyond_pink at 10:31 AM on June 26, 2010


So here's how I'd do it.


1. I'd use the current domain 1 hosting provider for now, but add domain2 to its DNS. I'd then run domain 2 off the files currently hosting domain1. Essentially just renaming domain1 to domain2. Use this until your contract expires.

Now if all you really want to do is change domain 1 to domain 2 there's no reason to switch hosting providers, if you want to switch to a new host then on new host.

1. Set up a dummy domain name
2. Copy all the files over to new webserver.
3. Do a WP Export/Import (or a MySQL dump and import - a little more complicated)
4. Make sure everything is working okay
5. Move domain2 dns from hosting provider 1 to hosting provider 2
posted by bitdamaged at 10:32 AM on June 26, 2010


Forgive me if you have already read this, but WordPress' guide to moving an install is extremely helpful.
posted by Wossname at 11:07 AM on June 26, 2010


You could register an account at http://freedns.afraid.org/ and set up the full DNS records along with CNAME / DNS records for
www.domain1.com.  CNAME  www.domain2.com.
and combine this with a redirect at domain1.com to www.domain1.com (via .htaccess, through the hosts' cpanel, or via the original DNS records).

This may also be called 'domain alias' on the admin panels of your hosting provider. This sounds like shared hosting, so you most likely won't have this degree of freedom.
posted by sleslie at 11:54 AM on June 26, 2010


For future reference, if you have an expired domain you can no longer use and need to access your WP admin on a current domain that already has all the files/databasen, you can do this:


Edit wp-config.php to have these lines BETWEEN the <?php and ?> tags:
define('WP_HOME','new domain's path to WP');
define('WP_SITEURL','new domain's path to WP');
and log into Wordpress.

Then, navigate to the Settings/General page in the Administration site. There should be two greyed out boxes with the name you put into the above code. Return to wp-config.php and delete or comment out the two lines you added. Refresh the General Settings page and then put the names there.


(I forgot to change my domain info in WP before my old domain expired. Oops :D)
posted by rubah at 10:14 PM on June 26, 2010


I did this earlier this year, it is surprisingly more complicated than it seems. After a few failed attempts to do it using Wordpress's instructions, I used this youtube instructional video and had it done properly in a few minutes.
posted by biscotti at 7:15 AM on June 27, 2010 [2 favorites]


« Older I'm looking for some really ca...   |  I have a month of gardening le... Newer »
This thread is closed to new comments.