To use WordPress usually you need a MySQL database, but there is a way you can use it even without a database. Accurately, it is not none. I will use a database called SQLite instead of MySQL.
Since SQLite can be used anywhere basically if it is a server that can use PHP, it can also be used with a shared rental server that MySQL can not use. In short, you can use WordPress even with Lollipop’s monthly 100 yen plan (economy plan).
table of contents[hide]
Features of SQLite
We call it “Esquirer”. It is a simple database and can be used as standard in PHP 5 or later. It is convenient because it does not require a separate database server. By the way, because Firefox configuration file etc uses SQLite, contents can be seen by SQLite manager etc.
There are versions 2 and 3, and it generally refers to version 2 unless you write SQLite 3. Since PHP 5.3, the SQLite 3 function has been incorporated. Prior to PHP 5.3, SQLite 3 could not be handled unless via PDO.
The actual state of the database is one file. So backup is easy. Just download this file and it’s OK. It is unnecessary for DUMP. It is the same sense as Access mdb file. Just running download can not be recommended.
Operate WordPress with SQLite
I use the plug-in “SQLite Integration”. Since there is a comment page of detailed setting method, please refer to it.
As a basic flow,
- On the local PC, replace “db.php” of SQLite Integration with “db.php” of WordPress main body
- Rewrite “wp-config.php” appropriately
- Upload to rental server with FTP etc.
- I normally recommend to install WordPress
It’s pretty simple.
Notes on operating with SQLite
I do not think that this method can be recommended for hundreds of thousands of PV sites. Use MySQL normally. Although it can not be done with SQLite, logs and other things will be troubled because simultaneous writing causes an error.
There are quite a few plug-ins that I can not use. It is better to think that the plug-in system involving the database is almost useless.
Cache system such as “W3 Total Cache” and “DB Cache Reloaded Fix” that I tried on trial could not be used. If you put these plugins and WordPress becomes completely white, overwrite “db.php” in “SQLite Integration” plug-in again, it will cure.
Database management tool
If you want to see the contents of WordPress’s database directly, you will see it with phpMyAdmin, but for SQLite you can see it using “SQLiteManager” in the same way.
Although it is a little old, the installation method was in All About. Even now it is almost the same.
The location of WordPress’s database file itself is “/ wp-content / database / .ht.sqlite”. Please write in the path with the full path of the server or relative to the place where SQLiteManager was put. For example “../blog/wp-content/database/.ht.sqlite”.
If you download this “.ht.sqlite” file itself by FTP etc., it becomes backup. However, please make sure that writing to this file does not occur in the maintenance mode etc. before downloading. If it is written while downloading via FTP, the downloaded file will not be backed up as it will no longer be a normal file.