tiracles
Forum Replies Created
-
Today , for subdomain B I’ve created an alternative wp-config file named wp-config2.php. Is exactly a clone from the original, except that I changed the prefix tables for the one I need ( The prefix tables from the plugin in subdomain A). After that I went into the plugin files and I replaced
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly!
}
for
require_once(ABSPATH . ‘wp-config2.php’);
$connection = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD);
mysqli_select_db($connection, DB_NAME);
I replaced it in every php file, but the plugin, keeps reading the database tables from subdomain B instead of the plugin tables from subdomain A.
I don’t know what I’ve missing :S
- This reply was modified 3 years ago by tiracles.
Forum: Developing with WordPress
In reply to: Sharing plugin tables between 2 sitesNice bcworkz, thank you! I’m gonna research that. I will keep you guys updated about it.
Forum: Developing with WordPress
In reply to: Sharing plugin tables between 2 sitesThe plugin is supportcandy.
The tables cannot have the same prefix, as they are from 2 different wordpress installations, in the same database.
I’m testing inside the plugin code but I cannot see where I could make any effective change on it, The plugin loads the wp enviroment.