Title: Database Connection
Last modified: August 19, 2016

---

# Database Connection

 *  [webdad3](https://wordpress.org/support/users/webdad3/)
 * (@webdad3)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/database-connection-4-2/)
 * I am BRAND new to creating plugins. I have successfully created a plugin that
   works but I am concerned with the php code as it has a username and password 
   for the Database in it. Any buddy with a limited amount of knowledge would know
   more information then I would like to share about my DB.
    The plugin has simple
   select statement in it…
 * Is there a tutorial that explains what I can do to prevent my DB connection from
   being shown to the public or whoever might use my plugin?
 * Thanks,
 * Jeff

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

 *  [figaro](https://wordpress.org/support/users/figaro/)
 * (@figaro)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/database-connection-4-2/#post-1224830)
 * I’m not a plugin developer and don’t have a video for this, but wouldn’t it be
   better to get that information from the wp-config.php using something like an
   include statement……
 *  Thread Starter [webdad3](https://wordpress.org/support/users/webdad3/)
 * (@webdad3)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/database-connection-4-2/#post-1224831)
 * That is part of what I was looking for… I guess the other part is that the DB
   that I’m using is not a WP DB. It is the DB of my website.
 * Although technically it is on the same server and all that but if I used something
   like the wp-config.php how could I make the plugin available to the public?
 *  [figaro](https://wordpress.org/support/users/figaro/)
 * (@figaro)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/database-connection-4-2/#post-1224837)
 * Again, I’m not a plugin developer, but it seems to me that you will need to incorporate
   the tables into the wp db if you want to make it available to the public, otherwise,
   what good would it be to others?

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

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

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [tutorial](https://wordpress.org/support/topic-tag/tutorial/)

 * 3 replies
 * 2 participants
 * Last reply from: [figaro](https://wordpress.org/support/users/figaro/)
 * Last activity: [16 years, 7 months ago](https://wordpress.org/support/topic/database-connection-4-2/#post-1224837)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
