Pages

Thursday, June 26, 2014

Fix wordpress image urls in post on migration

Whenever we migrate wordpress from old domain to new domain we seldom encounter url errors where image urls in post do not get updated etc..

To Tackle this out here is a simple sql script

 UPDATE wp_posts SET post_content = REPLACE (  
 post_content,  
 'olddomain.com/wp-content/',  
 'newdomain.com/wp-content/');  

No comments:

Post a Comment