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?

LF00
  • 27,015
  • 29
  • 156
  • 295
Jshee
  • 2,620
  • 6
  • 44
  • 60

2 Answers2

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
num8er
  • 18,604
  • 3
  • 43
  • 57
  • 1
    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 – Nadir Latif Dec 19 '16 at 04:58
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
Community
  • 1
  • 1
Jshee
  • 2,620
  • 6
  • 44
  • 60