Installing Wordpress SQLite PDO

May 23, 2013 | Leave a Comment

Installing the PDO (SQLite) plugin for Wordpress requires a little fine-tuning of the Wordpress PHP files. You will need to ensure that SQLite has been installed on your (web hosting) server. The following configuration has been tested for Wordpress Version 3.1.2.

1. Download Wordpress 3.1.2 and PDO (SQLite) Plugin 2.7.0 from wordpress.org

2. Extract/uncompress the two downloads. You should now have a 'wordpress' folder and a 'pdo-for-wordpress' folder

3. Place the 'pdo' folder and 'db.php' file, located in the 'pdo-for-wordpress' folder, in the 'wp-content' folder located in the 'wordpress' folder

4. Create a folder named 'database' in the 'wp-content' folder of the 'wordpress' folder

5. Rename the 'wp-config-sample.php' file located in the 'wordpress' folder to 'wp-config.php'

6. Open the 'wp-config.php' file renamed above in a text editor (e.g. gedit on linux)

7. Add the following line

define('DB_TYPE', 'sqlite'); // use sqlite

after the lines

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

to give

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
define('DB_TYPE', 'sqlite'); // use sqlite

8. Replace the lines

with your own randomly generated keys to give something like

Save the file

The random keys can be generated online by visiting https://api.wordpress.org/secret-key/1.1/salt/

9. Open the 'wp_install.php' file located in the 'wordpress/wp-content/pdo' folder in a text editor and replace the line

with the line

Save the file and shutdown your editor

10. Upload all the folders and files located WITHIN the 'wordpress' folder to your (web hosting) server

11. Set the file permissions of the 'database' folder created above (Step 4.) to 777

12. Navigate your web browser to http://yourdomain/wp-admin/install.php to initiate the Wordpress install process

13. Enter a username and password and then click the 'install' button

14. You might see PHP code being printed to your browser - ignore this and scroll to the bottom of the page

15. Note your password and then click the 'login' link located at the bottom of the page

16. Enter your username and password. You should then be taken to the Wordpress Configuration Panel

Remember that you need to have SQLite installed on your (web hosting) server for this to work.

Good luck.

 

   Leave a Comment
Name :
Comment :
 
 

  Cynthia  13:26:07 GMT
Thank you very much. It actually worked.
  Terence  05:41:23 GMT
Excellent tutorial. My wordpress sqlite site is now up and running. Cheers.
  Maggie  12:06:05 GMT
Kudos to you! Clear and detailed instructions. So refreshing to find this on the web. Thanks.
  Martin  12:39:17 GMT
Thank you. It works with the latest version, i.e. 3.2.1.
  Kota  16:28:45 GMT
Thanks, this is a great howto. Still there are couple of bugs in pdo for wp 2.7.0, though. You might notice annoying errors every time when you open up admin pane. This seems to be due to the imcomatibility of the sql statement between mysql and sqlite, such as lack of DATE_SUB function or INSERT INTO ... ON DUPLICATE KEY UPDATE syntax
  Casper  16:10:17 GMT
*_* works!!!! :P thanks!
  Max  11:53:06 GMT
Thank You, it worked
  Stephen  08:05:21 GMT
Thanks for this information it was really helpful :) I've tried this twice now and both times I found that the password for Admin was either not stored or was stored incorrectly. On first login I had to do a password reset. I think this might be to do with the install script timing-out while executing SQL in the install? NOt sure if others have faced the same problem. I also have a problem when I try to update posts. Clicking on updates produces the following error: "Warning : implode () [function.implode] : Invalid arguments passed in ... taxonomy.php on line 2944". (I have replaced the path info here with '...'). It is possible that this is also an issue with the install timing-out. I initially tried this with the latest Wordpress 3.5.3 but was only able to get it installed. However, using Wordpress 3.1.2 as you suggest and then upgrading works perfectly.