MySQL find and replace

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 –

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.

This entry was posted in technology and tagged , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


This site uses Akismet to reduce spam. Learn how your comment data is processed.