MySQL – Find and Replace Statement

by Dan

50px-Edit-find-replace.svgThe other day I had to move a blog from one server to another and found out that Wordpress sometimes likes to hard code the server address into things like links and images.  I found this handy little SQL statement you can run to find and replace anything that you need changed:

update [Table] set [Column] = replace([column],’[old text]‘,’new text’);

This can save you a lot of heart ache dealing with moving servers and find out that you have a lot of broken images left after migration.

Related posts:

  1. Regular Expressions Find and Replace Dealing with databases and SQL I run across a...
  2. Firebug – Firefox CSS Analyzer So last night I was bored and decided to...
  3. For Web Designers Website This is a pretty amazing site and has a...
  4. Setting up Mercury SMTP for XAMPP Alright so after being up late last night until...
  5. Windows x64 Access Database Connections I have spent many hours dealing with this on...

Related posts brought to you by Yet Another Related Posts Plugin.

Comments are closed.