7 ms·
WordPress should be on SQLite by default. Most installations run only on one sever and are rather small (less than a few GB database size). And not a lot of ins
by andix 4y ago
WordPress should be on SQLite by default. Most installations run only on one sever and are rather small (less than a few GB database size). And not a lot of inserts/updates to the DB.
In those cases SQLite will probably have much better speed and a lower memory footprint.
- andai 4y agoMost WP sites should be static sites.
- aritmo 4y agoAmen.
- freedomben 4y agoThose are orthogonal and not mutually exclusive. I have a couple wordpress sites that are static. There are a number of different ways to do it which range from Next.js with WP as a headless CRM (my current preference), or using a static site generator plugin inside of WP. I can recommend "Simply Static" as a handy plugin that (combined with nginx) will make as much of your site as possible static but still updates quickly and can allow some dynamism. But it does introduce complexity, and the more frequently the site changes the less it makes sense. As the site grows also most sites end up wanting dynamic stuff that often can't (or shouldn't) be done on the client-side, slowly making the static build less and less useful. It's just not that simple.
- ngrilly 4y agoYes, but you can still build a static site reading the content from a SQLite file instead of a directory of HTML files. That’s the beauty of SQLite: this is “just” a database library and file format.
- throw0101a 4y ago> Most WP sites should be static sites. https://wordpress.org/plugins/simply-static/ https://wordpress.org/plugins/simply-static/ https://wp2static.com https://wp2static.com
- testbjjl 4y agoWouldn’t that make managing tags and categories more difficult?
- mtlynch 4y agoIt's a little more difficult but not by much. On WordPress, you can change a tag, hit save, and the change is live. On a static site, the change would look more like: edit a file, rebuild the site, deploy to production. I left WordPress for static sites 8 years ago and never looked back. It's so nice to eliminate the database and web server from your stack and have everything under source control.
- rabite 4y agoOn my internal network servers I use wp-supercache to generate static pages on page visit, then I use a shell script that iterates through all possible article, rss, tag, and category pages with curl at varying intervals, forcing a cache build. In parallel I rsync all the images and statically built pages to my public edge. The public only gets to interact with content that is completely static and don't have php installed at all. It is easy enough, and the only real way to allow people to install whatever dumb wordpress plugins that they want on the internally installation without getting the sites owned all the time.
- innocenat 4y agoThis is assuming users are technical user, which isn't the case in most WP site.
- blenderdt 4y agoWait, rather small as in GB!? I don't know much about WordPress but I wouldn't expect a simple website's DB to be more than a few MB.
- marpstar 4y agoThey start getting a lot bigger once you start accepting and saving user input, e.g. running a WooCommerce store.
- andix 4y agoThat's smaller than "a few GB", so no problem ;) SQLite can get tricky, if the database files get bigger. But up to a few GB there should be no problem at all (SQLite supports up to 281 TB though)
- 2000UltraDeluxe 4y agoThe practical DB size limit for WordPress is around 60-70GB. After that it becomes rather sluggish.
- r2_pilot 4y agoThat is terrifying that you know this. I am almost curious but would rather not know more.
- technion 4y agoIt'll become unusable at a few hundred meg when it takes 180 SQL queries to render a landing page.. I wish I didn't know that either.
- 2000UltraDeluxe 4y agoA few hundred megs for a single page? Yes. For an affiliate site with millions of pages you need much more to make WordPress sluggish. On the other hand, it only takes a single badly written plugin to achieve the same effect. :D
- martinskou 4y agoI host quite a lot and the size is around 40-80 MB for presentation sites. Shops are around 100-300 MB. So a nice fit for SQLite. Would be a really nice options, but it should be part of the normal WP distribution.
- blacksmith_tb 4y agoGhost[1] can be spun up using sqlite3 or MySQL, I have been supporting a company Ghost blog on sqlite for years now, works nicely. 1: https://ghost.org/docs/architecture/ https://ghost.org/docs/architecture/
- JadoJodo 4y agoIsn’t this going away in a near future update?
- tirrex 4y agoExactly. Is there any benefit running mysql instead of sqlite for Wordpress? Feels like default db should have been sqlite all along.