I was testing with WordPress on a Cpanel server with PHP 7 provided by the CloudLinux PHP selector. Unfortunately, I ran in a blank screen of death while installing WordPress (blank screen wp-admin/setup-config.php?step=2). Fortunately, solving this problem is easy.

  1. Log in to Cpanel.
  2. Select PHP Version.
  3. Select the module mysqli.
  4. Click save.

This resolves the problem. WordPress tries to use mysql_connect if mysqli is not available. However, that function is dropped in PHP7 in favor of other – more safe – methods to handle database queries. If you have debugging enabled, you would have found something similar like this:

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/kickthis/public_html/wp-includes/wp-db.php:1520 Stack trace: #0 /home/kickthis/public_html/wp-includes/wp-db.php(658): wpdb->db_connect() #1 /home/kickthis/public_html/wp-includes/load.php(371): wpdb->__construct('kickthis_wp', 'xiTlz]d(A#9l', 'kickthis_wp', 'localhost') #2 /home/kickthis/public_html/wp-settings.php(88): require_wp_db() #3 /home/kickthis/public_html/wp-config.php(89): require_once('/home/kickthis/...') #4 /home/kickthis/public_html/wp-load.php(37): require_once('/home/kickthis/...') #5 /home/kickthis/public_html/wp-blog-header.php(13): require_once('/home/kickthis/...') #6 /home/kickthis/public_html/index.php(17): require('/home/kickthis/...') #7 {main} thrown in /home/kickthis/public_html/wp-includes/wp-db.php on line 1520

Leave a Reply

Your email address will not be published. Required fields are marked *