Hi there, I duplicated a wordpress site on another domain name. And I want to go into the database and change everything which contains "website1surl.com" to "secondnewwebsitesurl.com" so that all the images and what not are not being fed from the site at the previous domain.
And what is the question? How to make these changes? Create the dump of site's database, manually replace "website1surl.com" to "secondnewwebsitesurl.com" and load the dump to the server.
Not only the image path in the database need to change, the posts path also need to reconfigure pointing to a new domain name. The easier way that I can think of is to export out the existing database, search and replace the domain name using any editor of your like, and then import it back to a new domain server.
Hey Chris, you can export the data from wordpress and replace with the domain name, I have done this one from wordpress.org to my domain its worked well
Did you try this? https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ I think that will help.
That one is great and you can use on any site with mysql. I have found that using wordpress backup plugins don't always work 100% so its faster for me to move everything and use the above script to update the paths. Another good plugin that is just for updating paths is Velvet Blues https://wordpress.org/plugins/velvet-blues-update-urls/
Or if you're a badass, you can just use SQL. Something like: UPDATE your_table SET your_field = REPLACE(your_field, 'website1surl.com', 'secondnewwebsitesurl.com') WHERE your_field LIKE '%website1surl.com%'