InMotion Hosting Support Center

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.

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

  2. Next, you will want to navigate the to the root directory of your WordPress installation. Typically, it will be in your public_html directory.

  3. Once you've found the wp-config.php file, right-click it and click on Code Edit.

  4. Inside this file, locate a link that says:

    define( 'DB_COLLATE', '' );

  5. 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' );

  6. Be sure to save your settings when done.

The following are examples of collation that can be used for UTF-8 character sets:

  • utf8_bin
  • utf8_czech_ci
  • utf8_danish_ci
  • utf8_esperanto_ci
  • utf8_estonian_ci
  • utf8_general_ci (default)
  • utf8_hungarian_ci
  • utf8_icelandic_ci
  • utf8_latvian_ci
  • utf8_lithuanian_ci
  • utf8_persian_ci
  • utf8_polish_ci
  • utf8_roman_ci
  • utf8_romanian_ci
  • utf8_slovak_ci
  • utf8_slovenian_ci
  • utf8_spanish_ci
  • utf8_spanish2_ci
  • utf8_swedish_ci
  • utf8_turkish_ci
  • utf8_unicode_ci
Was this article helpful?

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

0 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!