Plesk

WordPress instance shows improper characters instead of symbols, such as  â after migration to Plesk

Symptoms

Cause

Incorrect collation on some tables in the domain's database.

The Charset and Collation from the WordPress instance database example_db are set as follows:

# plesk db
MariaDB [psa]> use example_db;
MariaDB [example_db]> SELECT @@character_set_database, @@collation_database;
+--------------------------+----------------------+
| @@character_set_database | @@collation_database |
+--------------------------+----------------------+
| utf8 | utf8_general_ci |
+--------------------------+----------------------+

There are tables in the example_db database with a different collation than the one above, for example:

# plesk db -ne"SHOW TABLE STATUS FROM example_db" | grep latin
table1 ... latin1_swedish_ci
table2 ... latin1_swedish_ci

Resolution

  1. Log into Plesk.

  2. Go to Domains > example.com > File Manager.

  3. Open the wp-config.php file and comment out the lines below by putting // at the beginning of the line as follows:

    //define('DB_COLLATE', '');
    ...
    //define('DB_CHARSET', 'utf8');