1
votes

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\Apache24\htdocs\wordpress\wp-includes\wp-db.php:1643 Stack trace: #0 C:\Apache24\htdocs\wordpress\wp-includes\wp-db.php(639): wpdb->db_connect() #1 C:\Apache24\htdocs\wordpress\wp-includes\load.php(427): wpdb->__construct('root', 'root', 'wordpress', 'localhost') #2 C:\Apache24\htdocs\wordpress\wp-settings.php(120): require_wp_db() #3 C:\Apache24\htdocs\wordpress\wp-config.php(92): require_once('C:\Apache24\htd...') #4 C:\Apache24\htdocs\wordpress\wp-load.php(37): require_once('C:\Apache24\htd...') #5 C:\Apache24\htdocs\wordpress\wp-blog-header.php(13): require_once('C:\Apache24\htd...') #6 C:\Apache24\htdocs\wordpress\index.php(17): require('C:\Apache24\htd...') #7 {main} thrown in C:\Apache24\htdocs\wordpress\wp-includes\wp-db.php on line 1643

1
mysql_* was removed in php 7.0bassxzero
You need to update WordPress. The current version works just fine with PHP 7.3.x.Dave

1 Answers

1
votes

As bassxzero said, mysql_connect was removed from PHP since the 7.0 version. See https://www.php.net/manual/en/function.mysql-connect.php

This extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used.

You have two choices :