[wp-hackers] Tips for moving a Wordpress install

Harish Narayanan harish.mlists at gmail.com
Tue Dec 1 20:33:17 UTC 2009


Christian Gundersson wrote:
> Hi,
> 
> I've been trying to find a good guide to moving a Wordpress installed site
> from one location to another, more specifically from one host to another.
> 
> All guides I've found fail in one aspect or the other. Either they
> completely disregard moving the media library(an important part in many of
> my sites) or they move files but not metadata information.
> 
> There is always the complete database backup option using phpMyAdmin but
> won't that screw with site urls etc?
> 
> How do you guys move from a development install to a live install site?

1. Dump the database to a file.

2. Copy the entire file tree over to the new location.

3. Modify wp-config to match new domain/db details.

4. If you hard-coded anything like absolute paths into your data (e.g.
beta.foo.com/blog/2009/my-images/ instead of /blog/2009/my-images/), you
need to run a search and replace on your database dump file before
inserting it.

4a. Go to wp_options in the database dump and update the values for
'home' and 'siteurl.' (We've been through this a couple of times just
this last week.)

5. Reinsert the database contents in the new database.

Harish


More information about the wp-hackers mailing list