Changing your WordPress database collation
If characters are not being stored properly on your WordPress site, or if you are using a different language in which the characters that you entered are not the same as what is being displayed, you may need to change your database collation. For example, if you database uses character set that is not utf8_general_ci, you will need to tell WordPress to use a different collation. If you need to change the character set of your database as well, take a look at the WordPress codex page on converting your database character sets. In this article, we will show you how to define a custom database collation within WordPress.
As we will be using the cPanel file manager to edit your wp-config.php file, you will need to log into cPanel and click on the File Manager icon.
Next, you will want to navigate the to the root directory of your WordPress installation. Typically, it will be in your public_html directory.
Once you've found the wp-config.php file, right-click it and click on Code Edit.
Inside this file, locate a link that says:
define( 'DB_COLLATE', '' );
Within this line, you may set your collation between the two single quotes. For example, it may look something like this:
define( 'DB_COLLATE', 'utf8_general_ci' );
- Be sure to save your settings when done.
The following are examples of collation that can be used for UTF-8 character sets:
- utf8_general_ci (default)