WordPress displays weird characters

Sometimes after a database conversion (e.g. from MySQL to MariaDB) or due to encoding issues a situation might arise when WordPress is showing weird characters. A quick way of remedying the situation would involve examining the pages to discover a pattern (what characters are being substituted, in the example below the apostrophe was replaced by â€™) then running an queries against the database to reverse the effect. Here's a quick example (common tables that store content):

  • UPDATE wp_posts SET post_content = REPLACE(post_content, 'Â''')     
  • UPDATE wp_posts SET post_content = REPLACE(post_content, '’'"'")     
  • UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'Â''')     
  • UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, '’'"'")     

  • Please, keep in mind that to permanently resolve the issue you would need to get to the root of the problem and may need to adjust encoding, run a database conversion, or install a sanitizing plugin.


    1. blockchain It’s very informative and you are obviously very knowledgeable in this area. You have opened my eyes to varying views on this topic with interesting and solid content.

    2. Pubg Aimbot All the contents you mentioned in post is too good and can be very useful. I will keep it in mind, thanks for sharing the information keep updating, looking forward for more posts.Thanks


    Post a Comment

    Popular posts from this blog

    Mail-enabled security groups in Office 365

    User attributes in Office 365

    Skype for Business and VTC Interoperability