Created
June 15, 2016 15:40
-
-
Save mattradford/b3d497f297ba34c9ae32b1a84b73d154 to your computer and use it in GitHub Desktop.
WordPress Database encoding cleanup. YMMV.
This file contains hidden or 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_content = REPLACE(post_content, 'â€', '”'); | |
UPDATE wp_posts SET post_content = REPLACE(post_content, '’', '’'); | |
UPDATE wp_posts SET post_content = REPLACE(post_content, '‘', '‘'); | |
UPDATE wp_posts SET post_content = REPLACE(post_content, '—', '–'); | |
UPDATE wp_posts SET post_content = REPLACE(post_content, '–', '—'); | |
UPDATE wp_posts SET post_content = REPLACE(post_content, '•', '-'); | |
UPDATE wp_posts SET post_content = REPLACE(post_content, '…', '…'); | |
UPDATE wp_posts SET post_title = REPLACE(post_title, '“', '“'); | |
UPDATE wp_posts SET post_title = REPLACE(post_title, 'â€', '”'); | |
UPDATE wp_posts SET post_title = REPLACE(post_title, '’', '’'); | |
UPDATE wp_posts SET post_title = REPLACE(post_title, '‘', '‘'); | |
UPDATE wp_posts SET post_title = REPLACE(post_title, '—', '–'); | |
UPDATE wp_posts SET post_title = REPLACE(post_title, '–', '—'); | |
UPDATE wp_posts SET post_title = REPLACE(post_title, '•', '-'); | |
UPDATE wp_posts SET post_title = REPLACE(post_title, '…', '…'); | |
UPDATE wp_comments SET comment_content = REPLACE(comment_content, '“', '“'); | |
UPDATE wp_comments SET comment_content = REPLACE(comment_content, 'â€', '”'); | |
UPDATE wp_comments SET comment_content = REPLACE(comment_content, '’', '’'); | |
UPDATE wp_comments SET comment_content = REPLACE(comment_content, '‘', '‘'); | |
UPDATE wp_comments SET comment_content = REPLACE(comment_content, '—', '–'); | |
UPDATE wp_comments SET comment_content = REPLACE(comment_content, '–', '—'); | |
UPDATE wp_comments SET comment_content = REPLACE(comment_content, '•', '-'); | |
UPDATE wp_comments SET comment_content = REPLACE(comment_content, '…', '…'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment