• Daniel de Assis

    (@danielfisa)


    After the last WordPress update (6.4.1) the following fatal error occurred:

    Uncaught Error: Call to undefined function wp_kses()

    Please update the hyperdb plugin again. If necessary, make it a Pro plugin, but update it again. It is a vital plugin for anyone using database replication with WordPress.

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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' )
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Uncaught Error: Call to undefined function wp_kses()’ is closed to new replies.