• I have two separate WP installs in two separate databases. I’d like to call data from database ‘A’ to insert into the sidebar of WP in database ‘B’. I have two questions:

    1. am I right in thinking this is possible? Presumably I can include some php/mysql code to open database ‘A’ in the sidebar of WP on database ‘B’ and then use $wpdb to query the relevant data (in this case excerpts of posts).

    2. if this is possible, are there any security issues I should be aware of? Normally database name and password would only appear in config.php. Are there any risks in having this data in a theme template file such as sidebar.php?

  • The topic ‘Open mysql connection to second wp database’ is closed to new replies.