4

How can I fix this? im trying to do a clean install of wordpress latest on ubuntu 16 running nginx for Php7

When i access : http://blog.mysite.com/wordpress/

I get:

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

How can i resolve this?

2 Answers 2

5

Simply install necessary extensions and restart fpm process:

sudo apt-get install php-mysqlnd php-mysqli
sudo /etc/init.d/php7.0-fpm restart
Sign up to request clarification or add additional context in comments.

1 Comment

Support for the php-mysql extension has been removed from Php 7. php-mysqli is the recommended extension for using Mysql with Php. The Mysql Native Driver extension is a replacement for the Mysql client libraries. It is does not provide functions for accessing Mysql database server, but instead provides functions that can be used by other Php extensions such as mysqli. It also provides management functions such as mysql proxy and query statistics. The Mysqlnd extension removed the need for Mysql client libraries. So it is possible to work with Mysql databases with only Mysqlnd extension
0

This is a real relief I found this post, which helped me: How to enable MySQLi extension in php 7?

Basically, if you're running php7 instead of php5 you should run this to resolve this issue:

sudo apt-get install php-mysql

and yes, as @Kris mentioned:

reload your webserver

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.