Programming

How to Fixed Warning: mysql_set_charset() Error in WordPress

November 23, 2016

Are you getting this error on the top of your wordpress blog showing an error “Warning: mysql_set_charset() [function.mysql-set-charset]: Error executing query in YOUR_PATH\wp-includes\wp-db.php on line 829“. I tried searching on Google and looking for a solution but nothing fixed the wordpress error. But found out this error is cause of a wrong DB_CHARSET set in your wordpress config after upgrading my server from Godaddy into a new server.

How to Fixed Warning: mysql_set_charset() Error in WordPress

  1. Go to your root folder and open wp-config.php.
  2. Then, find this line define(‘DB_CHARSET’, ‘utf8mb4’);.
  3. Change the ut8mb4 to utf8m it should like: define(‘DB_CHARSET’, ‘utf8m’);.
  4. Save it and reload the page.

Hope this problem fixed your wordpress error! If you still have problem on this error, leave a comment below.

You Might Also Like...

3 Comments

  • Reply
    Rocky
    February 1, 2018 at 7:35 am

    your solution worked in my website, but do you know why it worked, please?
    please teach me if it convenient, thanks

  • Reply
    Ola
    August 25, 2018 at 5:13 pm

    Wow, so easy solution! it works in my website too, THANK YOU VERY MUCH 🙂

    • Reply
      Tinay
      September 21, 2018 at 6:13 pm

      You’re welcome, Ola! 🙂

Leave a Reply