WordPress global search and replace
I moved this site from blog.jamesjpn.com to jamesjpn.net. A problem I faced was there were 678 lines of code that pointed to photos on the blog.jamesjpn.com server and I needed to edit the posts to point the links to the new server on jamesjpn.net. Thanks to http://www.barrywise.com/2009/02/global-find-and-replace-in-wordpress-using-mysql/ I learned how to do a global search and replace in the Sql section of phpMyAdmin!
UPDATE wp_posts SET post_content = REPLACE(post_content, ‘blog.jamesjpn.com’, ‘jamesjpn.net’)
It would have taken me a long time to do the job by editing each post, whereas Sql did a global search and replace of 678 lines of code in only 0.8187 of a second!
Please follow and like us:
(Visited 66 times, 1 visits today)