How To Fix the PHP Error:
When setting up a new WordPress install on a Linux VPS, it’s not uncommon to get an error message “Your PHP installation appears to be missing the MySQL extension”. This is because the MySQL extension isn’t included with the operating system. Don’t get too discouraged, we have a fix. Follow these simple steps to get the MySQL extension set up on your server.
Steps to fix “Your PHP installation appears to be missing the MySQL extension which is required by WordPress“
-
- Connect to your server via SSH
In your terminal, type in:
ssh [ip address]
- Check the version of PHP that is install
php -v - Install MySQL
If you are up to date, you will most likely have php 7. Run the following command:
apt-get update
apt-get install php7.0-mysql
If you are running php 5, run
apt-get update
apt-get install php-mysql - Restart your Apache server
You will need to restart apache for the new php module to run properly
/etc/init.d/apache2 restart
or
apachectl restart
- Your error message should now be fixed!
- Connect to your server via SSH