Web Development Blog
WordPress Database Search and Replace
  • Posted:
  • November 26, 2013
  • Comments:


I recently had to migrate a WordPress site to a not only a new server, but one that would incorporate a different URL from the original site configuration. Since the website database is full of blog posts and theme files that are all connected with a different URL, just moving the code to the new server is not good enough. Luckily the folks over at Interconnectit.com have developed a wonderful tool that makes this situation extremely easy to handle, while also covering countless other use-case scenarios as well. You can use this php script to do a serialized search & replace for any values on any table in the database.

This is particularly useful in a rebranding scenario, or setting up a mirror site for a satellite branch of a company. If you need to change the company name or contact details that appears in different pages, posts or template files throughout the site, simply run this database search & replace script and your problem is solved immediately!

WordPress Database Search & Replace –>


The original website I had was VanguardFunding.net. My task was to migrate the same site and set up a new one for a branch that will be at another location, but also at another URL, VanguardCommack.com. After copying over the files and properly setting up the database, all I needed to do was upload this script to the home directory and access it via the web browser. The script runs a configuration wizard that seamlessly gets you ready to run the search & replace. It took mere minutes to change the base url for the entire website structure while also replacing & updating all company contact information & verbiage. An incredibly handy script!

No Comments
Leave a Comment