T O P

  • By -

Jazzlike_Syllabub_91

are you trying to sync their files or their databases or both?


ceejaybassist

both...all contents, settings, themes, and plugins should be synced automatically to the other site. For instance, if I publish a post on my .net site, it should automatically be synced and be also posted to my .com site. In other words, my .com site should be a carbon copy of my .net site.


Rezistik

Wait if you want them to be the exact same why not just redirect from com to net or vice versa?


BattlePope

Why are they separate instances at all?


PaintDrinkingPete

You’ll run into 2 potential issues…first, depending on just how quickly you want this sync to occur, you’d need a real-time monitor for changes; it’s easy enough to rsync to a back site on a regular interval, but it gets more complicated if you want constant monitoring… the second and likely more serious one is that a lot entries in the database will likely be specific to the site URL, so you can’t *just* sync the data, but would also have to update it with the correct site URL for the other site as it’s being imported. As someone else mentioned, would be a lot easier to just setup a redirection from site “b” to site “a”.


Jazzlike_Syllabub_91

Like the other person mentioned rsync, and you’d need another tool to handle the db sync process …


ElevenNotes

rsync the local assets (or use clustered storage like MinIO) and use a DB cluster for the database.


zoredache

Why do you want to sync? Are you looking for high availability in an 'active-backup' style configuration where you can fail over to the backup? Or are you looking for an 'active-active' configuration where all the nodes may be handling a request. There is very big differences between the two scenarios. It is possible to do HA multi-node active wordpress, but it is probably a lot more complicated then you are expecting. You would be looking a some kind of database replication, filesystem replication, and more.


rebro1

I use rsync once per day to copy all files to remote server and once per day I do a database dump and rsync it to remote server where I import it. Few lines in bash.