Last active
August 26, 2016 16:21
Star
You must be signed in to star a gist
get a WordPress site's database collation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* By Barry 2016-08-26 | |
* | |
* Get a WordPress site's database collation | |
* | |
* NOTE: MUST change "tribeDBftict" to your own database name | |
* NOTE: MAY NEED TO change "wp_" if you have a custom database prefix | |
* | |
* It should result like this in PHPMyAdmin: https://cl.ly/3V0O3x0B1B1R | |
*/ | |
SELECT char_set.character_set_name | |
FROM information_schema.`TABLES` table_data, | |
information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` char_set | |
WHERE char_set.collation_name = table_data.table_collation | |
AND table_data.table_schema = "tribeDBftict" -- change to your own database name | |
AND table_data.table_name = "wp_postmeta" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment