database – I want to replicate a wordpress website over multiple servers

Question

Yes, you can have 2, tens, even hundreds of individual servers running WordPress with the same codebase connected to the same database server. But there are lots of non-WordPress steps you need to take to get it working, and it may not solve your problem.

  • You would need to figure out a load balancing solution, which would not involve WordPress
  • This does nothing if the performance bottleneck is the database, that would require database replication which is a separate topic
  • A robust page caching solution, or software such as varnish would be more performant for a much lower cost

Just adding more servers is not a silver bullet solution, and can lead to odd issues ( e.g. cron job race conditions, that usually crop up when syndicating or pulling in posts only to find there are duplicate posts created ). This is assuming it helps at all, you should measure your performance and scaling bottlenecks and identify where the cost is and what the bottlenecks are on the server side.

Keep in mind that you can serve tens of thousands of page views on the cheapest Digital Ocean droplet ( ~$5pm ) if it’s set up right, persistent object caching, full-page caches for logged out requests, and a well built site that doesn’t lean heavily on post meta searches and NOT IN queries.

0
James White 4 months 2022-04-03T18:11:58-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse