How to Clean WordPress Database From Bad Characters?

Clean WordPress Database from Bad Characters?


Clean WordPress Database from Bad Characters?

We know manually update all post of a site is very hardy and take much time. Here I have presented a WordPress query that you can run in order to clean WordPress database from weird characters. Please take a backup of your database before running this clean WordPress database query.

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_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, '…', '…');

Simply copy and paste this codes in your Database and click on Go Button like the below image

Source


Tags: wordpress database error, wordpress error establishing a database connection, wordpress database, backup wordpress database, how to backup wordpress database

About Masum Billah

Clean WordPress Database from Bad Characters? 1stWebSuite website seo tool is a free website ranking tool site provides a lot of on page and off page seo useful tools for you. On this site, we have a large number of website ranking tools



Discuss about: How to Clean WordPress Database From Bad Characters?


Newsletter Subscription

Enter your email address:

Delivered by FeedBurner