Skip to content

wordpress-sqlite

WordPress is a web CMS (Content Management System) that lets you create dynamic websites quickly and easily.

It has an internal caching system to speed-up page loading, which mitigates the performance loss compared to a static website.

There is also an official WordPress Android app, which makes it easy to make changes to your website using your smartphone.

In this tutorial we will see how to install WordPress using an SQLite database as storage backend.

⚠ Warning: this setup is intended for testing, development, and lightweight use cases only. SQLite lacks the performance, scalability, and concurrency management needed for production WordPress websites. Use this setup at your own risk.

Tested on the following setup:

Install Tiny File Manager

First of all, download Tiny File Manager from the following URL: https://raw.githubusercontent.com/prasathmani/tinyfilemanager/master/tinyfilemanager.php

If your website will also be visible to some other people, it is advised to rename the downloaded tinyfilemanager.php script to some random name, to prevent others from guessing it once it will be uploaded to the website.

Edit its configuration (which is placed at the beginning of the script itself) to have a single read-write user with a strong password. Example:

PHP
1
2
3
4
5
6
7
8
$auth_users = array(
    // Warning: this is just an example! do NOT store the plain text password
    // here - put the hashed result instead. Also, use a really strong
    // password, not a simple one like this
    'admin' => password_hash('mypassword', PASSWORD_DEFAULT)
);

$readonly_users = array();

Then upload the script to your website root folder.

Install WordPress

Note: to make website management easier, we will install WordPress in a subdirectory of the web hosting space, named website.

Using Tiny File Manager's "Upload from URL" feature, download the latest WordPress compressed archive into the website root. The URL is the following:

https://wordpress.org/latest.zip

Using Tiny File Manager's "UnZip" feature, extract the archive content to the website root. As a result, you should get a wordpress folder there.

Rename such wordpress folder to website.

Remove the WordPress compressed archive from the website root.

Using Tiny File Manager's "Upload from URL" feature, download the WP SQLite DB WordPress plugin (it's a single db.php file) into the website/wp-content directory. The URL is the following:

https://raw.githubusercontent.com/aaemnnosttv/wp-sqlite-db/master/src/db.php

This will make WordPress use an SQLite database as storage backend.

Rename the wp-config-sample.php file to wp-config.php.

Finalization and cleanup

Delete the unnecessary files from the WordPress folder, such as license.txt and readme.html.

Now visit https://<your-domain>/website to finalize the WordPress installation.

Warning: once the website is created, do NOT change its URL, as that would break all the images, links and other stuff.

Since we installed WordPress in the website subdirectory, we can create an index.php file in the website root with the following content, to redirect users to the website when they visit the root (/):

PHP
<?php header('Location: /website/'); ?>Redirecting...

Now you can remove the Tiny File Manager script from your website root.

Tips and further steps

In order to keep your website management simple, it is advised to have a single WordPress user if you don't need multiple ones.

To prevent the website from breaking unexpectedly without your supervision, you might want to go to the DashboardUpdates menu and click on Switch to automatic updates for maintenance and security releases only. This helps keep your website secure while minimizing disruptions. However, always remember to regularly back up your site and keep your WordPress installation up to date.

As for the theme, Twenty-Twenty Three is a good choice, as it allows easy customization of all website elements. However, if it doesn't work for some reason, Astra is a good alternative.

By default the Home Page will show a list of the most recent posts. You can change this in the SettingsReading screen.

If you want to keep your website as clean and simple as possible, you can avoid using Posts or Comments, if they are not necessary; you can build a good showcase website using Pages only.

Same thing about WordPress plugins: don't use any of them if not necessary.

You can also protect some pages with a password. If you use the same password for multiple pages, WordPress will keep it in memory and the user won't have to re-type it for every protected page.