That is because after upgrading WordPress, the file wp-db.php has been deprecated and replaced with class-wpdb.php.
Solution:
Simply update line 19 in wp_content/db.php as follows:
require_once( ABSPATH . WPINC . ‘/wp-db.php’ );
replace with
require_once( ABSPATH . WPINC . ‘/class-wpdb.php’ );
That should resolve the issue.
@ lesliehuang
Thanks but it did not help at all. And this line is at 28.
EDIT:
It finally worked. Line 28:
require_once ABSPATH . WPINC . '/class-wpdb.php';
FYI, a bit late but the fix for this should be setting the following:
WPDB_PATH=${ABSPATH}${WPINC}/class-wpdb.php
That can go in a .env
file if your site uses one otherwise it can go in wp-config.php
such as:
define( 'WPDB_PATH', ABSPATH . WPINC . '/class-wpdb.php' )