Created
July 20, 2022 01:06
-
-
Save andcam/d8e54fe8d99d8b8f78339ad73186ff1b to your computer and use it in GitHub Desktop.
Wordpress UTF8 chars fix - search & replace
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_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_postmeta SET meta_value = REPLACE(meta_value, '“', '“'); | |
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'â€', '”'); | |
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, '’', '’'); | |
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, '‘', '‘'); | |
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, '—', '–'); | |
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, '–', '—'); | |
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, '•', '-'); | |
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, '…', '…'); | |
UPDATE wp_terms SET name = REPLACE(name, '“', '“'); | |
UPDATE wp_terms SET name = REPLACE(name, 'â€', '”'); | |
UPDATE wp_terms SET name = REPLACE(name, '’', '’'); | |
UPDATE wp_terms SET name = REPLACE(name, '‘', '‘'); | |
UPDATE wp_terms SET name = REPLACE(name, '—', '–'); | |
UPDATE wp_terms SET name = REPLACE(name, '–', '—'); | |
UPDATE wp_terms SET name = REPLACE(name, '•', '-'); | |
UPDATE wp_terms SET name = REPLACE(name, '…', '…'); | |
UPDATE wp_termmeta SET meta_value = REPLACE(meta_value, '“', '“'); | |
UPDATE wp_termmeta SET meta_value = REPLACE(meta_value, 'â€', '”'); | |
UPDATE wp_termmeta SET meta_value = REPLACE(meta_value, '’', '’'); | |
UPDATE wp_termmeta SET meta_value = REPLACE(meta_value, '‘', '‘'); | |
UPDATE wp_termmeta SET meta_value = REPLACE(meta_value, '—', '–'); | |
UPDATE wp_termmeta SET meta_value = REPLACE(meta_value, '–', '—'); | |
UPDATE wp_termmeta SET meta_value = REPLACE(meta_value, '•', '-'); | |
UPDATE wp_termmeta SET meta_value = REPLACE(meta_value, '…', '…'); | |
UPDATE wp_term_taxonomy SET description = REPLACE(description, '“', '“'); | |
UPDATE wp_term_taxonomy SET description = REPLACE(description, 'â€', '”'); | |
UPDATE wp_term_taxonomy SET description = REPLACE(description, '’', '’'); | |
UPDATE wp_term_taxonomy SET description = REPLACE(description, '‘', '‘'); | |
UPDATE wp_term_taxonomy SET description = REPLACE(description, '—', '–'); | |
UPDATE wp_term_taxonomy SET description = REPLACE(description, '–', '—'); | |
UPDATE wp_term_taxonomy SET description = REPLACE(description, '•', '-'); | |
UPDATE wp_term_taxonomy SET description = REPLACE(description, '…', '…'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment