Update, add, remove plugins, themes or wordpress behind load balancer

This is a fantastic question – I’ve personally never run into this before, but here’s what I’d try, assuming:

  • you have an image of a server that you’ve been using to spin up new instances
  • you’re using a CDN and cloud storage for images and uploads (rather than having a local uploads folder)

With those two assumptions, it means you can spin up and spin down instances of the server without worrying about data loss – the files and config between each server are identical.

  • Spin up a new instance of your server, but don’t add it to the load balancer
  • point your hosts file to the IP of the instance
  • update the plugin on the instance, make sure everything is working as you expect
  • create an image of the updated server
  • spin up one more instance based on the updated image
  • point the LB at the new instances

This is a bit of a painful process, and I think next would also look into automated deployment tools, such as Capistrano, or maybe a service like Deploy.

Leave a Comment