Quite often, especially when working with WordPress sites, I need to update content with a new web address. This happens when a site has been on a preview domain whilst being populated, and WordPress likes to put absolute paths in place for image uploads and the like.

Without having to go through EVERY post and altering the domain, if you have access to the SQL database – through something like phpMyAdmin, or hard-core command line – you can update the data by using inbuilt REPLACE funtion.

Simply execute the following code (if you’re updating WordPress posts).

Or check out the below for a break down of how it works:

Image Credit: therefromhere