Custom Post type in separate database table for syncing

Based on the details above, I can think of the following suggestions:

  1. Create a setup in which you have two servers using the same database. This can work if both your setups are identical to each other

  2. Sync the data (option 1). Write a plugin that you install on both servers, and this plugin will periodically read data from the other database and update its own records

  3. Sync the data (option 2). Write functionality that, when you update a record in database 1, it will trigger a REST API call that is sent to the second installation. Then that second installation will receive the updated data from the first installation via that call, and update its own records.

  4. Create a central database that both installation have access to, and this central database will contain shared data for both installations

  5. Have you thought of WordPress network setup (not sure if this works in this environment, you have to decide if this fits your requirements)

Personally, I like options 3, and 4 based on my understanding of the problem, but again, I do not have the full picture as you do.

Leave a Comment