Answer the question
In order to leave comments, you need to log in
Is it possible to use one database for two Wordpress engines on different hostings?
There are two hostings for one site - the first is fast because it is here, but with a sudden influx of users it falls. The second one does not fall, but slowly gives away and here. With cloudflare switching between almost instantaneous (manual load balancing)
That's what I want. The Wordpress engine is both there and there, it is necessary to synchronize the MySQL database. I thought that I could demolish it on one hosting and force the Wordpress engine to connect to the database based on what is more stable. two engines and one base.
Are there any user cases on how to get around the problems that Wordpress settings are stored in a database like file paths? Will there be speed issues?
Or maybe it can be done through a more correct place?
Answer the question
In order to leave comments, you need to log in
It is possible, provided that at least 1 of them supports external connections to mysql
C on the other hand, the point of failure, as 1 was, remains the same.
Correct: look towards mysql replication. Master-master is better, but master-slave will also work as a backup.
No need to fence three crutches. just make the site work normally under load.
It is possible, but not necessary. With proper caching, most of your queries will not reach the database. And with very proper caching, they won't affect PHP either.
WP loves to contact the database for any trifle, so taking it to far distances is fraught.
It would be more correct to do database replication, but if you have any changes in the type of comments there, then you need to do master-master replication, which has problems for 2 servers, it is better to put the 3rd one.
If the changes are centralized (admin or api), then you can make a master-slave replica.
But I see the problem in a different way - the influx of visitors is solved through caching. If you don’t have user-dependent blocks there, then it’s enough to put nginx with 1 minute cache in front of wp and the load will stabilize
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question