[wp-hackers] Tips for moving a Wordpress install

Christian Gundersson gundersson at gmail.com
Tue Dec 1 21:44:15 UTC 2009


1. mysqldump --opt -uDB_USER1 -p -h DB_HOST1 DB_NAME1 > my_db_file
2. scp username1 at foo.com:~/path/to/wp username2 at bar.com:~/new/wp
3. emacs wp-config.php
4. sed -i 's/foo/bar/g' my_db_file > my_new_db_file
5. mysql -uDB_USER2 -p -h DB_HOST2 DB_NAME2 < my_new_db_file
6. Celebrate your site going live!

This is not obvious nor trivial for the uninitiated ;) (Exept perhaps step
6, I got that down to an art form)

Thanks for all the replies, I'll take this to heart and plan with this in
mind hereafter. I'm gearing up on my WP skills and hopefully I'll be able to
contribute to this "problem" one way or the other.


2009/12/1 Otto <otto at ottodestruct.com>

> On Tue, Dec 1, 2009 at 2:20 PM, Christian Gundersson
> <gundersson at gmail.com> wrote:
> > How do you guys move from a development install to a live install site?
> Short answer: I don't. Not with content.
> When developing plugins, themes, etc, then those are easy to move
> around, generally speaking. The content, not so much. So I keep the
> dev sites having test content only. I don't write posts and such on
> dev and then move them to production, I write them on a staging or
> production site, and just don't publish until I'm good and ready.
> If you want to move an entire site, then yes, you're going to have to
> do some searching and replacing on the sqldump. I've never had any
> problems doing this, just make sure to keep the old database around
> until you actually have the new site up and running.
> Note that an Export/Import operation can indeed keep the media files
> working properly, but it has to go directly to the other site to
> retrieve the files in question. Because of this, your staging site
> usually has to be internet visible. This is one reason I advice people
> to keep their sites on live servers, in hidden directories and such.
> Running localhost systems is fine for development, but not for
> staging.
> -Otto
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list