WordPress Core to start using SQLite
make.wordpress.org
make.wordpress.org
I don't care for managing ports / sockets, migrating configurations, doing the creating database (careful not to use the not-really-utf-8 charset), user and granting privileges dance. Overkill for my use case.
Backups will also be easier: a simple rsync call will do, no need to call the specific mysql backup command anymore (of course it's automated but that's one less thing that can fail, less moving parts)
I bet we are many people in this case.
Technically, that's incorrect way of doing it; practically it rarely fails (as writes are usually much rarer in many cases SQLite is used, especially if you backup in the middle of the night, and format itself is pretty resilient), but you should be doing one of methods here:
This is a poison pill suggestion. I would absolutely switch to SQLite for my blog, but I'm not going to make that commitment using a plugin for something as important and central as the database layer. It's kind of ridiculous to even consider that, to be honest.
With a plugin I have to go through the installation process, install the plugin, migrate the data, and then serve my blog. No one is going to do that. With plugins I'd also be scared that I'd be locked out of upgrades in Wordpress if the plugin lagged behind, and I would definitely worry about the plugin being dropped altogether. Those concerns go away completely if it's built right into Wordpress itself. That's on top of the fact that the plugin explicitly states that it's for testing.
Edit: It looks like at some point the article was changed to point to the official WordPress site, I think this was the original link:
I thought SQLite was file based. What's there to support?
Not sure why any host would disable it, but I could see it happening.
With a bit of effort you can run WP on say a RPi or an Odroid. Use a free dynamic DNS service to get it out there. A couple of NAT port forwards on your router. Lets Encrypt gets you a free SSL cert. A bit of research into web servers gets you an A+ score at SSL labs and a frisson of security! WP has some app firewall style addons and the web server eg apache or nginx have some useful addons and modules.
Self hosting isn't for everyone, obviously. You are not restricted in any geopolitical sense when choosing a provider. If say, you are living in the US, you can rent a VPS in say Germany and crack on.
You can also get quite a lot of Cloudflare for free, for example.
Its 2023 and the options for publishing on the internets are absolutely astonishing. I used to use telnet to get to a rather plain text thingie at CERN back in the day (1994ish). Obviously the estate has changed somewhat since the and we have to deal with some really nasty issues that the early web didn't have.
I argue that self publishing is the only way to go but please either get yourself clued up on the security aspects of IT or hire it in or ensure your external platform is segregated from your non platform stuff (that might be VLANs, for example).
We all have an intrinsic ability and I think an inalienable right to be able to communicate a message. Not all messages are welcome and that is where things get tricky. I think we also have a right to not receive messages that we might find offensive. There is no agreed approach to "offensive". There are several "societal norms" and the like but those change depending on say location or even current mindset.
The internet allows anyone to communicate with anyone, via social media and other madness! That means that a Masai warrior, wandering the veldt and looking for a lion to take on, his asegai trembling in his hand so he can advance to manhood and then his phone finds a base station and he might suddenly be chatting with a child from the Netherlands (they both subscribe to the same Facebook Barbie fan group)! That is obviously nonsense but the world is really, very, very connected these days.
Oh sorry, SQLite? I have no idea why WP hasn't supported it for years. It is quite literally the obvious first choice. How many bloggers do you know that are also closet DBA's?
My rule one is that any important HA related stuff needs to be local and also fail safe. So my Reolink cameras never access the internet at large. I use PoE switches and a UPS for them. My doorbell is PoE powered too and also UPS backed. It has a wired chime too, so even if HA is dead it will still ring something.
I run HA on a Thinkcentre which is a bit of a gas guzzler but as you say, an Odroid is fine too.
Before the days cgnat and country wide firewalls
Laughing deeply in my whole heart.
Also, can't wait to use it (drastically simplify hosting for certain usecases) - hope it will land soon!
Long live Wordpres
- Have a .htaccess to block it. Only works with Apache of course but that covers most shared hosting.
- Have rewrite rules that takes precedence. Only works if the user enables url rewriting (automatic only on Apache)
- Part of the sqlite database file name will be randomized. eg sqlite_xJ4D6e1E3.db. That usually works well but I suppose in theory it can be bruteforced...
- The documentation will recommend it should be placed outside the webroot but the installer won't do it automatically because it can't safely assume the user has access to the parent folder. Realistically not that many people will end up doing that.
I, for one, am still excited to no longer have to deal with questionable plugin to use wordpress on a mysql-free server.
Thankfully https://roots.io/bedrock/ exists to bridge the gap if you're absolutely forced to use WP.
These utilize WebAssembly (php-wasm) and an SQLite database backend to run a whole WordPress instance in the browser or a local Node.js instance.
Submitters: "Please submit the original source. If a post reports on something found on another site, submit the latter." - https://news.ycombinator.com/newsguidelines.html
It's not a great system.
If all you need is a static site generator with code in git, then go ahead, however the use for Wordpress is an audience who needs a full application to manage a site.
The use case for WordPress is businesses who don't really need a website at all but everybody demands that they have one and they want to outsource running a website so you can blame somebody else when it gets hacked into and can tell your marketing and sales department go bother somebody else about the website. <Raises hand>.
Anybody who actually needs an application to manage their site has staff and they don't use WordPress.
AFAICT it’s not that. It’s that most shops want the ability to edit content without a developer. But such a requirement doesn’t mandate that data lives in a database vs something like, say, a set of plain-text files, that would be amenable to version control and diffing
I solved that by setting up a GitHub repo that mirrors the content from my database to flat files a few times a day and commits any changes.
It's worked out really well so far. It wasn't much trouble to setup and it's now been running for nearly three years, capturing 1400+ changes.
I'd absolutely consider using the same technique for a commercial project in the future:
Latest commits are here: https://github.com/simonw/simonwillisonblog-backup/commits/m...
Workflow is https://github.com/simonw/simonwillisonblog-backup/blob/main...
For my purposes here the feature I care most about is backups - having my content backed up to a GitHub repo feels extremely robust, since I know GitHub mirror content to (I believe) three continents.
I'm adding features and content to legacy Wordpress websites where the clients are liable to change config and add and alter content themselves via the admin portal. There seems no easy way to automate deployment from local development into production without accidentally erasing someone's changes, and to keep up to date with production without losing your own work.
It seems like a tricky problem to solve, and maybe a bespoke version control system might be required (e.g., throw CRDTs at the problem?), but essentially I should be able to diff and merge between my local work and the production version while clients are making their own edits.
If so I'd be tempted to have a really shonky system - basically run a "git commit -a -m 'Updates' && git push" on an hourly cron, purely to capture their changes.
Merging in changes made elsewhere would still be hard, but at least you would know what was changed by them and when.
The way it also treats Headings, etc as just different blocks from the rest of the text is so annoying. It takes 2-3 clicks to do something you used to be able to do instantly. It feels so unfinished, you just shouldn't have to spend so much time doing very basic things. Very baffling considering it's been out for so long at this point.
On a serious note, this is very interesting. SQLite is just awesome and this will be a welcome addition to the core.
> WordPress developers who do not agree with the idea of introducing SQLite in WordPress core are mainly concerned about ... migration process or converting from one database to another
Pointless limitation that will make your app slower and SQL code worse.
> I get physically ill when I walk into yet another Rails shop to find that they have used every cool feature of Postgres and as a result, the CI must spin up a huge postgres instance and multiple plugins just to run a single unit test. Ugh.
shrug. We (not rails shop) just create temporary database, pass it to CI test, remove after. Picking database because your CI is done badly is like one of the worst ways to decide on architecture
Assuming they can just "do it" is a bad assumption of both the depth of their existing stack and their companies budget for migrating.
I'm gonna guess you haven't been around long enough to have FTP'd files as a deployment.
That seems to be the common opinion, but I don't think that it's based on anything tangible.