Applicable to:
- Plesk Onyx for Linux
- Plesk for Linux
- Plesk for Windows
Symptoms
-
After importing a WordPress instance from another server to Plesk, the website shows characters such as
 â
. For example:CONFIG_TEXT: This isâthe website content.Â
-
The following line is present in the domain's
wp-config.php
file in Plesk > Domains > example.com > File Manager:CONFIG_TEXT: define('DB_COLLATE', '');
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
-
Go to Domains > example.com > File Manager.
-
Open the
wp-config.php
file and comment out the lines below by putting//
at the beginning of the line as follows:CONFIG_TEXT: //define('DB_COLLATE', '');
...
//define('DB_CHARSET', 'utf8');
Comments
0 comments
Please sign in to leave a comment.