0

I have a WordPress site running and I am making a data entry portal for our data entry operators to speed up their work (we need data entry portal to make sure we don't have duplicate entries). I have two databases one of WordPress and other one of data-entry-portal. I want to make some communication in between two, so any changes in any one DB reflects in other too. Can't use stored procedures and triggers due to structural difference in both databases. any other ideas on it?

0

Two ways:
1. use the federated engine to enable one Mysql server to talk to the other;
2. have WordPress talk to both. Create a second wpdb object that talks to the non-WordPress database. This is quite possible, and you can give it non-WordPress-related queries. See Using wpdb to connect to a separate database for more.

The fly in the ointment is transactions. Actually, out-of-the-box WordPress doesn't even do transactions at all. That's a bigger issue with multiple servers. How to do that right would be good question by itself.

| improve this answer | |
  • What about cron jobs? is it suitable for this scenario? Your suggested method no. 2 will increase load on WordPress site? – Hira Anwer Mar 23 '19 at 6:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.