Can I explicitly specify ENGINE=InnoDB in WordPress?

If the code creating new tables uses dbDelta() (it should), you can filter the query (see wp-admin/includes/upgrade.php):

add_filter( 'dbdelta_create_queries', function( Array $queries )
{
    foreach ( $queries as $table => $query )
    {
        if ( FALSE !== stripos( $query, 'CREATE TABLE' ) )
        {
            // change the query here
        }
    }

    return $queries;
});

Leave a Comment