Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very clever and lightweight #1

Open
smcnally opened this issue Dec 30, 2021 · 2 comments
Open

Very clever and lightweight #1

smcnally opened this issue Dec 30, 2021 · 2 comments

Comments

@smcnally
Copy link

smcnally commented Dec 30, 2021

This is a Thanks, not an Issue. This project is very clever -- thank you for making it available. Your custom db class makes things like wp-cli Just Work as-expected.

And direct access to the per-site dbs is straightforward from ./dist//wp-content/database/

sqlite3 .ht.sqlite

which was handy when I blew things up changing the site to https in WP's Admin UI before I had wp-cli installed.

sqlite> update wp_options set option_value = 'http://<sitename>' where option_id = 1;

I'll share any success I have getting php8's dev server working with openssl. For now wpsqlite is a lightweight, low-hassle option for local dev. Thanks.

@smcnally
Copy link
Author

smcnally commented Feb 1, 2022

This works well for creating new posts and pages and opens exploring other portability possibilities. Thank you again for sharing it.

I've had issues with permissions, settings and options persistence, and with some plugins. Two from debug.txt:

Line 1654, Function: prepare_query, Message: Problem preparing the PDO SQL Statement.  Error was: SQLSTATE[HY000]: General error: 1 near "a": syntax error 
Line 1725, Function: execute_query, Message: Error while executing query! Error message was: SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: wp_options.option_value 

And from front-end debug, there were related WP Database errors.

Queries made or created this session were Rewritten

I haven't yet dug into these and will follow-up once I do.

@bangank36
Copy link

+1
Thanks for putting this together @hasinhayder, I've been looking for WP sqlite alternative for years and got this gem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants