I use the WP Maintenance Mode plugin which is a very handy plugin. I use the roots sync script when syncing DB and uploads changes (again, a great little script). The issue is when it’s resetting the DB it obviously breaks the site as it cannot connect to the DB. Depending on how big the DB is, sometimes it lasts for several seconds and it’s obviously not great if someone is on the site at that time. The WP Maintenance Mode plugin is no use during this time because it requires the DB. I’m curious how you guys handle this? I’m using the full roots stack FYI.
I assume you’re pushing your local DB to staging or production?
If so, I’d say most people avoid the issue that you have completely because a lot of us would not recommended to ever push database changes up.
One thing you could do, though, would be to serve a static HTML during your sync.
Yes, I’m aware it’s not best practise to push DB changes up. My only scenario is if I’m working on a new feature locally that really needs some DB changes, I’ll pull the latest locally from production, I will put the live site in maintenance mode using WP Maintenance Mode plugin so nothing on the live site can get out of sync (such as a new user signing up, or a new post being made). I’m aware I can just add a static index.html, I was just curious to see how others managed that.
This topic was automatically closed after 42 days. New replies are no longer allowed.