aaemnnosttv/wp-sqlite-db

Install fails: "Your PHP installation appears to be missing the MySQL extension which is required by WordPress."

Closed this issue · 4 comments

Hi,

thank you very much for the update on the Wordpress SQLite integration plugin! Just tried to setup a new site with the latest Wordpress and your db.php and when running the Wordpress install.php I just get the error "Your PHP installation appears to be missing the MySQL extension which is required by WordPress." Obviously I'd like to run the Wordpress site with SQLite, not with MySQL. Do I really have to install MySQL first or can I bypass the requirements check somehow?

Is the extension in the proper location with the correct file permissions?

What would be the correct file permissions? The whole wordpress directory is recursively owned by the webserver nginx:nginx and the wp-content/db.php has default -rw-r--r-- (644).

I had to install apt-get install php7.4-mysql to get rid of the message.
That module didn't install the whole MySQL server as a dependency, so that is fine for me.

The error message came from this file: ./wp-includes/load.php

Correct me if I am wrong, if file not exist(WP_CONTENT_DIR . '/db.php') then die.

        if ( ! extension_loaded( 'mysql' ) && ! extension_loaded( 'mysqli' ) && ! extension_loaded( 'mysqlnd' ) && ! file_exists( WP_CONTENT_DIR . '/db.php' ) ) {
                require_once ABSPATH . WPINC . '/functions.php';
                wp_load_translations_early();
                $args = array(
                        'exit' => false,
                        'code' => 'mysql_not_found',
                );
                wp_die(
                        __( 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.' ),
                        __( 'Requirements Not Met' ),
                        $args
                );
                exit( 1 );
        }
}