WordPress.org

Ready to get started?Download WordPress

Forums

Connecting to another database - security question (1 post)

  1. Michael Dance
    Member
    Posted 3 years ago #

    I'm working on a project that requires me to connect to another WordPress database on the same server. This seems to be easy enough to do by setting up a new wpdb class:

    $wpdb2 = new wpdb('database_user', 'password', 'database_name', 'localhost');

    However, I'm curious about the security ramifications of putting all that database connection info in, say, functions.php. What would be the best way to handle this?

Topic Closed

This topic has been closed to new replies.

About this Topic