0

I have two wordpress websites and I want to store the data submitted by the forms in a centralized database in order to better manage the information.

Is there a way I can store form data in a different database?

1

You can use $wpdb to access any database you have access to (credentials for) so one site or the other could access its partner's database or both could access a third database. It shouldn't be hard but you will need to write most of the SQL to do it.

If you are in a position to refactor this, you could consider having both sites share the same database, via distinct database prefixes, and then save to custom table instead of bothering with access to multiple databases.

Your question is not really specific enough to allow for a more detailed answer.

  • Thank you for the help, I am just trying to figure out how I can go about solving this problem. – Tangy Jun 23 '13 at 23:24

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.