Title: External Database Connection Question
Last modified: April 2, 2019

---

# External Database Connection Question

 *  [kevent](https://wordpress.org/support/users/kevent/)
 * (@kevent)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/external-database-connection-question/)
 * I found the GitHub repository for this plugin. Awesome work and project, btw.
 * Can you confirm that all the database connections and access is in the db.php
   file? [https://github.com/tbenyon/wordpress_external_login_plugin/blob/master/login/db.php](https://github.com/tbenyon/wordpress_external_login_plugin/blob/master/login/db.php)
 * So, if I wanted to adapt this to another database or even a cloud database API
   service like DynamoDB, I would re-write parts of the db.php file.
 * I see there are if-then statements to specify either PostgreSQL or MySQL right
   now. I would probably just do an extra db type like “dynamo” and the select queries
   would be replaced by requesting the external API to get the user data that matches
   the WordPress user data.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [tbenyon](https://wordpress.org/support/users/tbenyon/)
 * (@tbenyon)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/external-database-connection-question/#post-11383615)
 * Hey [@kevent](https://wordpress.org/support/users/kevent/),
 * You ceraintly could do that. All the database logic should be in that file for
   that very reason. It does need tidying and I want to use a PDO to add better 
   compatibility and less work for me. 😛
 * I would be really cool to help this work for others by making a pull request 
   when you’ve got it working so others could make use of your work.
 * No pressure to.
 * I’m happy to support you with this if you have any more questions.
 * Thanks,
 * Tom
 *  Thread Starter [kevent](https://wordpress.org/support/users/kevent/)
 * (@kevent)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/external-database-connection-question/#post-11385139)
 * I would definitely make a pull request. I am not at the stage of adding this,
   yet. I’m doing some due diligence on the External Login plugin as a solution 
   for me to offload the WordPress user tables to an external database.
 * Regarding using PDO (and some tidying) that’s a very good idea. I think that 
   would be an important improvement prior to me adding the external DB cloud API’s.
   That code would look significantly different than the current db.php.
 * Do you have an idea of how you would approach the tidying up of the db.php and
   using PDO?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘External Database Connection Question’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/external-login_fbebd6.svg)
 * [External Login](https://wordpress.org/plugins/external-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/external-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/external-login/)
 * [Active Topics](https://wordpress.org/support/plugin/external-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/external-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/external-login/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [kevent](https://wordpress.org/support/users/kevent/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/external-database-connection-question/#post-11385139)
 * Status: not resolved