WordPress + SQLite Integration + SQliteManager を試してみる

中小規模のウェブサイトなら、さくらインターネットのレンタルサーバ ライトプラン に申し込んで、Wordpress + SQLite で行けるのではと思い、調査してみたところ、問題なく行けそうだった。

ちなみに、さくらインターネットさんには早くphp7対応して欲しいなぁと。

WordPress 4.5.2

https://ja.wordpress.org/

ダウンロードして展開して任意の場所に配置。

SQLite Integration 1.8.1

https://wordpress.org/plugins/sqlite-integration/

  1. SQLite Integration をダウンロードして展開し、wordpress の plugin ディレクトリに配置します。
  2. SQLite Integration ディレクトリ内の db.php ファイルを wp-content 配下にコピーします。
  3. wp-config-sample.phpファイルの設定を DB_USER と DB_PASSWORD あたりを変更してアップロードする。
  4. http://xxxx/wp-admin/ のインストール開始URLあたりにアクセスするとインストールが開始される。

以上で、さくっとwordpressがインストールされます。

えーっと、phpMyAdmin は無いのかって?
phpMyAdmin 的な SQliteManager を利用します。
https://sourceforge.net/projects/sqlitemanager/
ダウンロードし展開後、任意の場所に配置。wordpressとは別ディレクトリにしておくのが無難でしょう。

SQliteManagerにブラウザでアクセスします

エラーが出ます

Deprecated: Non-static method sqlite::getDbVersion() should not be called statically, assuming $this from incompatible context in <パス略>/include/SQLiteAutoConnect.class.php on line 12

対処としてsqlite.class.phpファイルを修正

$ vi include/sqlite.class.php
function getDbVersion($fullPath){
↓
static function getDbVersion($fullPath){

管理画面が表示されたら最初にSQliteManagerにDBを登録します。

DB名はお好みでつけましょう

wpdb123

SQLiteDBファイルのパス(SQliteManagerから見た相対パス)

../wptest/wp-content/database/.ht.sqlite

当たり前ですが.htaccess等でアクセス制限をかけておきましょう

参考

WordPresssをデータベースなし(SQLite)で使う方法


多謝