Search and Replace PhpMyAdmin

Craig Martindale
Bert and Dip
Published in
1 min readNov 2, 2015

--

Here is an extremely helpful tip if you’re moving your WordPress install. SQL query for find and replace in PhpMyAdmin. I use this on pretty much every project I do, when moving from a test server:

update wp_posts set post_content = replace(post_content,’OLDURL’ ,’NEWURL’);
update wp_posts set guid = replace(guid,’OLDURL’ ,’NEWURL’);
update wp_postmeta set meta_value = replace(meta_value, ‘OLDURL’, ‘NEWURL’);

--

--