You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im using in some sites and it works very well. But Redirection doesnt setup automatically.
The sql statements doesnt run in SQLite because the difference in syntax.
With the help of ChatGPT I converted as following and it is working.
CREATE TABLE IF NOT EXISTS wp_redirection_items(idINTEGER PRIMARY KEY,urlTEXT NOT NULL,match_urlVARCHAR(2000),match_dataTEXT,regexINTEGER NOT NULL DEFAULT 0,positionINTEGER NOT NULL DEFAULT 0,last_countINTEGER NOT NULL DEFAULT 0,last_accessTEXT NOT NULL DEFAULT '1970-01-01 00:00:00',group_idINTEGER NOT NULL DEFAULT 0,statusTEXT NOT NULL DEFAULT 'enabled',action_typeVARCHAR(20) NOT NULL,action_codeINTEGER NOT NULL,action_dataTEXT,match_typeVARCHAR(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)
);
`
If its get merged into core, maybe some adjustments could be made in setup process.
The text was updated successfully, but these errors were encountered:
There is a proposal to make WordPress SQLite compatible. lets-make-wordpress-officially-support-sqlite
Im using in some sites and it works very well. But Redirection doesnt setup automatically.
The sql statements doesnt run in SQLite because the difference in syntax.
With the help of ChatGPT I converted as following and it is working.
CREATE TABLE IF NOT EXISTS
wp_redirection_items(
idINTEGER PRIMARY KEY,
urlTEXT NOT NULL,
match_urlVARCHAR(2000),
match_dataTEXT,
regexINTEGER NOT NULL DEFAULT 0,
positionINTEGER NOT NULL DEFAULT 0,
last_countINTEGER NOT NULL DEFAULT 0,
last_accessTEXT NOT NULL DEFAULT '1970-01-01 00:00:00',
group_idINTEGER NOT NULL DEFAULT 0,
statusTEXT NOT NULL DEFAULT 'enabled',
action_typeVARCHAR(20) NOT NULL,
action_codeINTEGER NOT NULL,
action_dataTEXT,
match_typeVARCHAR(20) NOT NULL,
titleTEXT, 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
) REFERENCESwp_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));
`
If its get merged into core, maybe some adjustments could be made in setup process.
The text was updated successfully, but these errors were encountered: