---
title: "Changing your WordPress database collation"
description: "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..."
url: https://www.inmotionhosting.com/support/edu/wordpress/change-wordpress-database-collation/
date: 2014-03-07
modified: 2022-03-11
author: "Jeff Matson"
categories: ["WordPress Hosting", "WordPress Tutorials"]
type: post
lang: en
---

# 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](https://dev.mysql.com/doc/refman/5.0/en/charset-general.html). 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](https://codex.wordpress.org/Converting_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](/support/edu/cpanel/how-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
