By default WordPress, the engine that powers this blog, uses MySQL/MariaDB as the database. In fact, it is the only database engine they support. For a few reasons, I preferred using SQLite. And now SQLite is used here.

In SQLite’s page Appropriate Users for SQLite they layout the many uses for SQLite. A few of these are Embedded, and Internet of Things, Data Analysis, Cache for Enterprise Data, Server-side Database, and many more. Included in the list is Websites. As they say,

SQLite works great as the database engine for most low to medium traffic websites (which is to say, most websites). The amount of web traffic that SQLite can handle depends on how heavily the website uses its database. Generally speaking, any site that gets fewer than 100K hits/day should work fine with SQLite. The 100K hits/day figure is a conservative estimate, not a hard upper bound. SQLite has been demonstrated to work with 10 times that amount of traffic.

The SQLite website (https://www.sqlite.org/) uses SQLite itself, of course, and as of this writing (2015) it handles about 400K to 500K HTTP requests per day, about 15-20% of which are dynamic pages touching the database.

“fewer than 100K hits/day” Um, yes, we get traffic in that range. Fewer than 1k hits/month is a better description of the traffic here.

SQLite is small, fast, self-contained (a single file holds all of your data), high-reliability, and full-featured. My interest in SQLite is a small size, a self-contained format, and simplicity.

And it is simple to use. You want to learn about SQL? Run sqlite3 tryme.db (replace tryme.db with any file name you would like) and code away. It is certainly the way I learned. OK, when I write “simple to use” SQL has much to learn, but it is accessible.

How did SQLite come to be in WordPress? Prior to 2015 a WordPress user, kjmtsh, developed and released a Plugin. Unfortunatly, he left the project. It was removed from the WordPress Plugin repository due to a lack of support. Fortunately for the world Daniel Loureiro has taken up the SQLite torch. He is building an upgraded Plugin.

Until he completes the work you can still install the current version and try it out.

See his information at WordPress with SQLite. In just the steps here’s how simple it is.

  • wget https://wordpress.org/latest.tar.gz
  • wget https://downloads.wordpress.org/plugin/sqlite-integration.1.8.1.zip
  • tar -xf latest.tar.gz
  • unzip sqlite-integration.1.8.1.zip
  • mv sqlite-integration wordpress/wp-content/plugins/
  • cd wordpress/
  • mv wp-content/plugins/sqlite-integration/db.php wp-content/
  • mv wp-config-sample.php wp-config.php
  • Start WordPress

That’s the bare-bones way to get it going. See WordPress with SQLite for details.

Leave a Comment