I find myself constantly doing this routine to migrate a wordpress database to staging or production servers:
- doing a SQL dump of the local wordpress database
- open the .SQL file then search and replace all “localhost:9999” with “mysite.com”
- 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?
Thanks!
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.