easily migrate wordpress database from local to production

I find myself constantly doing this routine to migrate a wordpress database to staging or production servers:

  1. doing a SQL dump of the local wordpress database
  2. open the .SQL file then search and replace all “localhost:9999” with “mysite.com”
  3. import modified .SQL to production database

I find this very cumbersome. Is there a more simple way to do this? I’m hoping there’s something equally simple as pushing changed files under version control?

Read More

Thanks!

Related posts

Leave a Reply

1 comment

  1. There’s a great article on WordPress.org about moving a WP project. Specifically, there is a very handy search and replace tool (discussed in the article) that will more easily do what you’re after.

    Article:
    http://codex.wordpress.org/Moving_WordPress

    Search and Replace Tool:
    http://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    I build a lot of WP sites and this method has worked seamlessly for me every time. The search and replace tool is a go-to utility for me.