Recently, I have been helping a friend with his new website using WordPress. We initially set up the site under one of his existing domains prior to purchasing a dedicated domain name for the site we were developing. He actually posted a lot of content prior to getting the new domain so when it came time to make the move, it was clearly necessary to perform a “find and replace” on the MySQL database to update the URL on all of the posts he had created.
After a little google searching I found this site – http://wordcastnet.com/2010/how-to-find-search-replace-and-delete-within-your-wordpress-mysql-database/
Everything I needed was explained. What a relief. After a few minutes of backing up and trial and error, I was able to run the query and update over 70 posts. I want to keep this query handy for the future. I’m pretty sure there will be a time when it is needed again and most likely for far more.