I wasted some time on this issue while setting up this blog.
You have installed the mysqli extension but somehow your PHP installation is not picking it up? First check if
/etc/php5/fpm/php.ini is pointed at the right place (in my case it wasn’t). Note here that
php5-fpm do not necessarily have the same configuration. Thus checking on the command line does not suffice.
Then (instead of restarting nginx again and again like there is no tomorrow, followed by light cursing because nothing did change. Yes, I’ve been there.) restart the FastCGI Process Manager with
$ sudo /etc/init.d/php5-fpm restart
and lean back.