Install Wordpress With Sqlite Database On Ubuntu 19.04
In this blog post, I will cover how to install wordpress with sqlite on Ubuntu 19.04. If your site is new, it is not bad to have sqlite as the database of your wordpress blog. When the site is growing big, you can migrate to mysql database.
Sqlite database need little memory to work. If your vps is having little size of RAM, you can use the sqlite to store the data of your site.
Here's how to install wordpress with sqlite as the database.
1. Install Apache
apt install apache2
systemctl start apache2
systemctl restart apache2
Status of the apache
systemctl status apache2
2. Install PHP
apt install php php-sqlite3
To make sure that php can run on apache, create a file named info.php
Add the following code into the info.php.
<?php phpinfo() ?>
c. Type http://ip_address/info.php into your beloved browser's address bar, then hit enter
3. Install Sqlite Database
apt install sqlite
4. Install phpliteadmin
Phpliteadmin is a php app that you can use to manage sqlite database.
apt install phpliteadmin
Open up browser app and type http://ip_address/phpliteadmin/phpliteadmin.php, then press enter. You now can manage sqlite database using phpliteadmin. To login to phpliteadmin admin, enter the default password: admin.
You can create a database now. For this tutorial I create one named wp
Install Wordpress With Sqlite Database
To install wordpress, follow these steps.
1. Download wordpress.
cd /var/www/html wget http://wordpress.org/latest.tar.gz
2. Extract latest.tar.gz.
tar xzvf latest.tar.gz
3. Download a plugin that can help you to install wordpress with sqlite. To install the plugin, follow these steps.
a. Download sqlite-integration plugin.
b. Copy sqlite-integration plugin to the plugin folder of wordpress blog.
mv sqlite-integration wp-content/plugins/
c. Move the db.php to the wp-content folder
mv wp-content/plugins/sqlite-integration/db.php wp-content/
4. When sqlite-integration plugin is configured, then setup the wp-config.php. Make a copy of wp-config-sample.php and rename it to wp-config.php.
Replace the following lines.
define( 'DB_NAME', 'database_name_here' ); define( 'DB_USER', 'username_here' ); 3define( 'DB_PASSWORD', 'password_here' );
With the following lines.
define('DB_FILE', 'wp'); define('DB_DIR', '/var/lib/phpliteadmin/');
Wp is sqlite database and /var/lib/phpliteadmin/ is the folder where the database is stored.
5. Type http://ip_address into your beloved browser's address bar, then hit enter to begin the installation procedure of wordpress blog.
Now you can see the welcome page to begin installing wordpress blog on your server.
Provide the information about your blog: Site Title, Username, Password and Your Valid Email. Then hit "install wordpress".
If the installation is succed, you can login to wordpress admin with the username and password you have provided.
Now, you can find the new tables has been created to store the data of your wordpress blog via phpliteadmin.