Title: Error During Setup (using sqlite)
Last modified: February 28, 2024

---

# Error During Setup (using sqlite)

 *  Resolved [andersonchagas](https://wordpress.org/support/users/andersonchagas/)
 * (@andersonchagas)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/error-during-setup-using-sqlite/)
 * The plugin installs and activates without any problems. However, when I proceed
   with the setup process, I receive the following error message:
 *     ```wp-block-code
       Database problem
       Failed to perform query "CREATE TABLE IF NOT EXISTS wp_redirection_items ( id int(11) unsigned NOT NULL AUTO_INCREMENT, url mediumtext NOT NULL, match_url VARCHAR(2000) DEFAULT NULL, match_data TEXT, regex INT(11) unsigned NOT NULL DEFAULT '0', position INT(11) unsigned NOT NULL DEFAULT '0', last_count INT(10) unsigned NOT NULL DEFAULT '0', last_access datetime NOT NULL DEFAULT '1970-01-01 00:00:00', group_id INT(11) NOT NULL DEFAULT '0', status enum('enabled','disabled') NOT NULL DEFAULT 'enabled', action_type VARCHAR(20) NOT NULL, action_code INT(11) unsigned NOT NULL, action_data MEDIUMTEXT, match_type VARCHAR(20) NOT NULL, title TEXT, PRIMARY KEY (id), KEY url (url(191)), KEY status (status), KEY regex (regex), KEY group_idpos (group_id,position), KEY group (group_id), KEY match_url (match_url(191)) ) DEFAULT CHARACTER SET utf8mb4"
       ```
   
 * Im using the sqlite database integration ([https://wordpress.org/plugins/sqlite-database-integration/](https://wordpress.org/plugins/sqlite-database-integration/))
   
   Is there something I can do to make it work?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [andersonchagas](https://wordpress.org/support/users/andersonchagas/)
 * (@andersonchagas)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/error-during-setup-using-sqlite/#post-17458276)
 * I converted the sql statements to SQlite sintax and it is working now:
 *     ```wp-block-code
       CREATE TABLE IF NOT EXISTS wp_redirection_items (
           id INTEGER PRIMARY KEY,
           url TEXT NOT NULL,
           match_url VARCHAR(2000),
           match_data TEXT,
           regex INTEGER NOT NULL DEFAULT 0,
           position INTEGER NOT NULL DEFAULT 0,
           last_count INTEGER NOT NULL DEFAULT 0,
           last_access TEXT NOT NULL DEFAULT '1970-01-01 00:00:00',
           group_id INTEGER NOT NULL DEFAULT 0,
           status TEXT NOT NULL DEFAULT 'enabled',
           action_type VARCHAR(20) NOT NULL,
           action_code INTEGER NOT NULL,
           action_data TEXT,
           match_type VARCHAR(20) NOT NULL,
           title TEXT,
           FOREIGN KEY (group_id) REFERENCES wp_redirection_groups(id)
       );
   
       CREATE TABLE IF NOT EXISTS wp_redirection_groups (
           id INTEGER PRIMARY KEY,
           name VARCHAR(50) NOT NULL,
           tracking INTEGER NOT NULL DEFAULT 1,
           module_id INTEGER NOT NULL DEFAULT 0,
           status TEXT NOT NULL DEFAULT 'enabled',
           position INTEGER NOT NULL DEFAULT 0
       );
   
       CREATE TABLE IF NOT EXISTS wp_redirection_logs (
           id INTEGER PRIMARY KEY,
           created TEXT NOT NULL,
           url TEXT NOT NULL,
           domain VARCHAR(255),
           sent_to TEXT,
           agent TEXT,
           referrer TEXT,
           http_code INTEGER NOT NULL DEFAULT 0,
           request_method VARCHAR(10),
           request_data TEXT,
           redirect_by VARCHAR(50),
           redirection_id INTEGER,
           ip VARCHAR(45),
           FOREIGN KEY (redirection_id) REFERENCES wp_redirection_items(id)
       );
   
       CREATE TABLE IF NOT EXISTS wp_redirection_404 (
           id INTEGER PRIMARY KEY,
           created TEXT NOT NULL,
           url TEXT NOT NULL,
           domain VARCHAR(255),
           agent VARCHAR(255),
           referrer VARCHAR(255),
           http_code INTEGER NOT NULL DEFAULT 0,
           request_method VARCHAR(10),
           request_data TEXT,
           ip VARCHAR(45)
       );
       ```
   
 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/error-during-setup-using-sqlite/#post-17827340)
 * I think you created this issue: [https://github.com/johngodley/redirection/issues/3812](https://github.com/johngodley/redirection/issues/3812)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Error During Setup (using sqlite)’ is closed to new replies.

 * ![](https://ps.w.org/redirection/assets/icon-256x256.jpg?rev=983639)
 * [Redirection](https://wordpress.org/plugins/redirection/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/redirection/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/redirection/)
 * [Active Topics](https://wordpress.org/support/plugin/redirection/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redirection/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redirection/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [John Godley](https://wordpress.org/support/users/johnny5/)
 * Last activity: [1 year, 12 months ago](https://wordpress.org/support/topic/error-during-setup-using-sqlite/#post-17827340)
 * Status: resolved