If you’ve ever moved a WordPress database from a local testing/development server to a live/production server, there are times when links don’t change appropriately. Maybe you have a custom header image that is now broken (that was my issue).
A beautiful solution I found was from David Coveney at Interconnect/it. He wrote this simple MySQL Database Search and Replace Script for WordPress. The instruction aren’t on the page, but are relatively simple:
- Download Script
- Place on production server
- Call the file in your browser
- Enter your production server info and submit
- Quickly and easily search and replace any references to your development server with the updated url to your production server
That last step might look like a search for “local.yourdomain.com” and replacing it with “www.yourdomain.com”.
Let me know if you have questions — not that I can answer them, but I’ll find someone who can!