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
Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Like this Article?

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

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

News / Announcements

WordPress wp-login.php brute force attack
Updated 2014-07-17 06:43 pm EST
Hits: 201023

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

Need more Help?

Search

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: support@InMotionHosting.com
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!