Last active
September 10, 2018 07:54
-
-
Save wpweb101/ab0c892197ffef92fb44c4688a8b0551 to your computer and use it in GitHub Desktop.
Social Auto Poster - Change table collection and character set
This file contains hidden or 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
| <?php | |
| /** | |
| * Add this in child theme function.php file. | |
| */ | |
| add_action('wp', 'wp_change_table_collection'); | |
| function wp_change_table_collection() { | |
| global $wpdb; | |
| if( empty( get_option('wpsap_wp_options_collation_changed') ) ) { | |
| $wpdb->query("ALTER TABLE wp_options CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"); | |
| update_option('wpsap_wp_options_collation_changed', 1 ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment