But :
Remplacer fougere.myds.me:8080 par les-fougs.com dans les champs post_content et guid de la table wp_posts
create table wp_posts_old as select * from wp_posts
SELECT post_content FROM wp_posts WHERE post_content like ‘%http://fougere.myds.me:8080/recettes%’
SELECT REPLACE (post_content, ‘http://fougere.myds.me:8080/recettes’ , ‘http://les-fougs.com/recettes’) FROM wp_posts WHERE post_content like ‘%http://fougere.myds.me:8080/recettes%’
update wp_posts set post_content = REPLACE (post_content, ‘fougere.myds.me:8080’ , ‘les-fougs.com’) WHERE post_content like ‘%fougere.myds.me:8080%’
SELECT guid FROM wp_posts WHERE guid like ‘%http://fougere.myds.me:8080/recettes%’
SELECT REPLACE (guid, ‘http://fougere.myds.me:8080/recettes’ , ‘http://les-fougs.com/recettes’) FROM wp_posts WHERE guid like ‘%http://fougere.myds.me:8080/recettes%’
update wp_posts set guid = REPLACE (guid, ‘fougere.myds.me:8080’ , ‘les-fougs.com’) WHERE guid like ‘%fougere.myds.me:8080%’
Source :
REPLACE(str,from_str,to_str)
Returns the string str with all occurrences of the string from_str replaced by the string to_str. REPLACE() performs a case-sensitive match when searching for from_str.
mysql> SELECT REPLACE(‘www.mysql.com’, ‘w’, ‘Ww’);
-> ‘WwWwWw.mysql.com’
This function is multibyte safe.