WordPress and PHP 8.1 UTF8MB4
Hello, I recently updated my WordPress from php ea-php7.4 to ea-php81, which is the latest version available and the following appears in the site health:
I use Cloudlinux 8, Litespeed, although I am not using the cloudlinux selector, I am using the multiphp manager
utf8mb4 requires a newer client library
UTF8MB4 is the character set WordPress prefers for database storage because it safely supports the widest set of characters and encodings, including Emoji, allowing for better support for languages other than English.
Your version of MariaDB supports utf8mb4.
WordPress support for utf8mb4 requires the MySQL Client Library (libmysql) version 5.5.3 or newer. Please contact your server administrator.
I use Cloudlinux 8, Litespeed, although I am not using the cloudlinux selector, I am using the multiphp manager
-
Which MariaDB version you are running? 0 -
Which MariaDB version you are running?
Thanks for replying, I'm using mariadb 10.60 -
1.) Take the backup of /etc/my.cnf
file using the below command. (In case anything goes wrong you can revert back)# cp /etc/my.cnf /etc/my.cnf-backup
2.) Now edit the /etc/my.cnf and add the following:[client] default-character-set=utf8mb4 [mysql] default-character-set=utf8mb4 [mysqld] character-set-server=utf8mb4 character_set_client=utf8mb4 collation-server=utf8mb4_general_ci
3.) Restart MariaDB server# systemctl restart mysqld
0 -
I did the steps and added but it still appears, here I attach my file. # This group is read both by the client and the server # use it for options that affect everything # [client-server] # # include *.cnf from the config directory # !includedir /etc/my.cnf.d [client] default-character-set=utf8mb4 [mysql] default-character-set=utf8mb4 [mysqld] log-error=/var/lib/mysql/.cprapid.com.err performance-schema=0 innodb_buffer_pool_size=134217728 max_allowed_packet=268435456 open_files_limit=40000 innodb_file_per_table=1 unix_socket=OFF character-set-server=utf8mb4 character_set_client=utf8mb4 collation-server=utf8mb4_general_ci
0 -
Check if switching the domain to alt-php81 with PHP native nd_mysqli
module enabled resolves the problem.0
Please sign in to leave a comment.
Comments
5 comments