Created
November 7, 2012 15:32
-
-
Save JPry/4032257 to your computer and use it in GitHub Desktop.
Remove funky characters in WordPress database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update wp_posts set post_content = replace(post_content,'’','\''); | |
update wp_posts set post_title = replace(post_title,'’','\''); | |
update wp_comments set comment_content = replace(comment_content,'’','\''); | |
update wp_postmeta set meta_value = replace(meta_value,'’','\''); | |
update wp_posts set post_content = replace(post_content,'…','...'); | |
update wp_posts set post_title = replace(post_title,'…','...'); | |
update wp_comments set comment_content = replace(comment_content,'…','...'); | |
update wp_postmeta set meta_value = replace(meta_value,'…','...'); | |
update wp_posts set post_content = replace(post_content,'–','-'); | |
update wp_posts set post_title = replace(post_title,'–','-'); | |
update wp_comments set comment_content = replace(comment_content,'–','-'); | |
update wp_postmeta set meta_value = replace(meta_value,'–','-'); | |
update wp_posts set post_content = replace(post_content,'“','"'); | |
update wp_posts set post_title = replace(post_title,'“','"'); | |
update wp_comments set comment_content = replace(comment_content,'“','"'); | |
update wp_postmeta set meta_value = replace(meta_value,'“','"'); | |
update wp_posts set post_content = replace(post_content,'‘','\''); | |
update wp_posts set post_title = replace(post_title,'‘','\''); | |
update wp_comments set comment_content = replace(comment_content,'‘','\''); | |
update wp_postmeta set meta_value = replace(meta_value,'‘','\''); | |
update wp_posts set post_content = replace(post_content,'•','-'); | |
update wp_posts set post_title = replace(post_title,'•','-'); | |
update wp_comments set comment_content = replace(comment_content,'•','-'); | |
update wp_postmeta set meta_value = replace(meta_value,'•','-'); | |
update wp_posts set post_content = replace(post_content,'‡','c'); | |
update wp_posts set post_title = replace(post_title,'‡','c'); | |
update wp_comments set comment_content = replace(comment_content,'‡','c'); | |
update wp_postmeta set meta_value = replace(meta_value,'‡','c'); | |
update wp_posts set post_content = replace(post_content,'â€','"'); | |
update wp_posts set post_title = replace(post_title,'â€','"'); | |
update wp_comments set comment_content = replace(comment_content,'â€','"'); | |
update wp_postmeta set meta_value = replace(meta_value,'â€','"'); | |
update wp_posts set post_content = replace(post_content,'Â',''); | |
update wp_posts set post_title = replace(post_title,'Â',''); | |
update wp_comments set comment_content = replace(comment_content,'Â',''); | |
update wp_postmeta set meta_value = replace(meta_value,'Â',''); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment