In fact, the full error I received when trying to upgrade my WordPress instance running on Centos 7 in a Digital Ocean droplet was the following:
Your PHP installation appears to be missing the MySQL extension which is required by WordPress
I’d been having issue on my droplet getting version updates for WordPress to work, and I thought it was a permissions issue. But after seeing this error when trying to update core through the WordPress command line interface (CLI) and Googling it I was brought to this informative page from Dreamhost that tipped me off that I needed to install a MySQL extension, particularly this bit:
If your website has been upgraded to a version of PHP over 7.0 and you’re seeing this error, it means you must update your WordPress core version and plugins to use the newer MySQLi or PDO_MySQL extensions instead.
That info led me to this Stack Overflow thread about enabling mysqlnd for PHP. From what I understand mysqlnd handles the communication between PHP and MySQL, and the following command installed it on Centos 7:
yum install php-mysqlnd
And then this one confirmed the install worked:
php -m | grep mysqlnd
After that using the WP CLI to upgrade the site was dead simple. I moved to the root of the WordPress install and ran the following command:
wp core update
I am also betting that automatic upgrades for the latest version of WordPress will no longer fail in the admin dashboard, but we’ll see.
Feels good to get that solved, that was one of the nagging issues I had on the Digital Ocean droplet, and with that put to rest I think I am sailing right along. In my next post I’m going to look at the costs of the Digital Ocean droplet because it is interesting to me and maybe one other person.