Unable to install WordPress due to a mysqli error
Symptoms
Automatic WordPress installation fails in ispmanager 6:
- When selecting PHP CGI mode, the error «System requirements are not met: php-extension: json, mysqli» is displayed;
- When selecting Apache as PHP mode, the error «Failed to install the application 'WordPress'» is displayed;
The error is registered in the control panel log at /usr/local/mgr5/var/ispmgr.log
Sep 25 15:22:55 [2999879:101550] aps ERROR Failed to install aps: 'PHP Fatal error: Uncaught Error: Call to undefined function PHPMailer\PHPMailer\mail() in /var/www/user2112/data/www/isptest.test/wp-includes/PHPMailer/PHPMailer.php:880Causes
The mail() function is disabled in PHP (CGI) settings.
Solution
Enable the mail() function in the PHP settings used for your WordPress site.
To do this, go to the PHP section, select the desired PHP version and click Advanced PHP settings. Find the disable_functions parameter and delete the «mail» value from the settings. Save the changes.