How to set up Drupal with Sqlite on Ubuntu 16.04
Get these packages with apt-get:
sudo apt-get install sqlite3
sudo apt-get install php7.0-sqlite3 // ...OR:
sudo apt-get install php-sqlite3 // This package pulls in the above one as a dependency, either way works
Then, use drush to install like normal. I'm using the multisite installation, see my multisite example or just ignore --sites-subdir:
drush site-install standard--sites-subdir="sqlite.octobeta.com" --db-url=sqlite://sites/sqlite.octobeta.com/files/.hidden.db.file.sqlite --site-name="SqliteSite" --account-name=admin --account-pass=SuperSecretPassword1
When the database file is created, make sure you're blocking .sqlite extensions in your server's configuration file. Like so, in Nginx:
location ~* \.(inc|make|engine|install|yml|info|module|sh|sql|theme|tpl\.php|sqlite|sqlite3)$ {
deny all;
}