Manual:SQLite

SQLite support for MediaWiki is 90% functional but still very much in development. As of MediaWiki version 1.13 the SQLite support is part of the main code-base. There are some notes below on installing the SQLite library into your PHP environment. The development notes and future plans are at MediaWikiLite.

About SQLite
The following description is from SQLite. Unlike client-server database management systems, the SQLite engine is not a standalone process with which the program communicates. Instead, the SQLite library is linked in and thus becomes an integral part of the program. The program uses SQLite's functionality through simple function calls, which reduces latency in database access as function calls are more efficient than inter-process communication. The entire database (definitions, tables, indices, and the data itself) is stored as a single cross-platform file on a host machine. This simple design is achieved by locking the entire database file at the beginning of a transaction.

SQLite was created by D. Richard Hipp, who sells training, direct technical support contracts and add-ons such as compression and encryption. The source code for SQLite is in the public domain.

SQLite Installation
It's important to have this working with SQLite3 rather than 2 because version 3 supports more similar syntax for some SQL such as table creation than version 2. Aside from that, version 3 uses more compact files and executes more efficiently. SQLite3 works via PHP's PDO functions.


 * To install SQLite3 on a Debian based system, use apt-get install php5-sqlite3.


 * Since PHP 5.1.0, SQLite depends on PDO. You should uncomment the following two lines in your  (note: sometimes you can't even use   to check if they are present, because an SQLite-enabled PHP tend to crash or fail when PDO is absent, especially on Windows):
 * (or  for Windows)
 * (or  for Windows)


 * Installer script needs to be patched to allow SQLite to work for a wiki installation since extensions are added from LocalSettings.php