Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 4 replies, has 3 voices.

Last updated by zsoltE-2 1 year, 1 month ago.

Assigned support staff: Bruno.

Author Posts
November 15, 2019 at 12:44 pm #4953999


I received the following errors when I activated wpml:
Table 'database.ah6_icl_languages' doesn't exis
Fatal error: Uncaught Exception: COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'utf8mb4' in ../plugins/wpml-string-translation/inc/package-translation/inc/wpml-package-translation-schema.class.php:163

Can you help me, how can I solve this?
Regards, Zsolt

November 19, 2019 at 8:05 am #4969307

George Botsev

Languages: English (English )

Timezone: Europe/Sofia (GMT+02:00)

Hello and thank you for contacting us.
It seems that you have some missconfiguration in your database that is causing that.
Some of your tables in the database are in the collation utf8_general_ci, and you seem to use utf8mb4 character set.
You can solve the problem in two ways.
- Change database collate of all tables to utf8mb4_unicode_520_ci
- Change default character set to utf8 instead of the current utf8mb4

Please let me know if you need further assistance about this.

November 26, 2019 at 3:29 pm #5023057


Hi George,

Thanks. I changed the database's collate to utf8mb4_unicode_520_ci as you said.
There is no fatal error any more, but it still not working, none of any icl_ table have been created:

WordPress database error Table 'database.xxx_icl_languages' doesn't exist for query SELECT default_locale .....

The database charset and collation is the following:

| @@character_set_database | @@collation_database   |
| utf8mb4                  | utf8mb4_unicode_520_ci |

Do you have any idea?

Regards, Zsolt

November 26, 2019 at 5:26 pm #5023913



Have you installed and configured WPML? Perhaps because of the previous problem, WPML was not installed completely. You can follow the steps below:

- Open your functions.php
- insert these lines:

if( function_exists( 'icl_sitepress_activate' ) ) {

- Save and upload the changed file
- Visit your site and wait for the page to load
- The function "icl_sitepress_activate" is precisely to create the tables in the database. Verify that the tables were created correctly.

By following these steps, can you see the created tables and use WPML correctly?

Thank you.

November 27, 2019 at 4:02 am #5025835


Hi Bruno,

It still do not work.
PHP Fatal error: COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'utf8mb4' in /usr/share/nginx/html/wp-content/plugins/sitepress-multilingual-cms/inc/setup/sitepress-schema.php on line 362

And others:
COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'utf8mb4'
Table 'amenteshonlap.ah6_icl_languages' doesn't exist
and so on.

Do you have any new try?
Regards, Zsolt