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...

5 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! πŸ™‚

  • Reply
    Padzz
    December 12, 2018 at 9:25 pm

    it works on the site that I am troubleshooting. Thanks for the info! πŸ™‚

    • Reply
      Tinay
      February 4, 2019 at 7:44 pm

      We are glad to help, Padzz! πŸ™‚

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.