Ways of managing staging and production wordpress sites?

Ok, I've seen a lot of similar questions.. but they all either outdated or do not fall in in my problem.

So the problem is: We have a website and its clone stage website. On that website, apart from me also works Content Manager. She manages content(banners, text, gallery and so on) When we need update website to new WP version or theme version or tweak/fix something we do it on our stage clone website. Once we are happy we clone it over to production one. Easy-peasy-lemon-squeezy. But! Sometimes the process of tweaking/fixing and updating takes longer than few hours or even days, and during that time the live site may get new content. And here is the dilemma. I have to then clone fresh version of the production site over to stage one and apply updates again. And that's totally insane in terms of productivity and time. I could teach our Content Manager how to do cloning in ManageWP(the service we use) but first, this is not her area of responsibilities, second it's not safe.

Sorry if it took me long to explain, but tried to give you a better picture of my problem.

So the question is, how do we streamline upgrading/updating live site from production without rewriting content? Is there any tool to selectively update Database? Or is there any option to separate Databases in WP? Make one only for content(posts, pages, media references so on) and another one for the rest backend kind of stuff?

Thank you for your attention and input

Topic staging production database Wordpress

Category Web


The problem seems to be you not deciding what is the "staging" server for. If it is for content staging/creation than it is actually a production server from software development POV. Anything that assumes that the software is functioning well and results in something being actually published is part of the production system.

You need a different server for software development needs. With two distinct server your problem becomes a simple communication and planning problem.

Good communication can also help in using the same server, but it is easier to be able to have two separate ones when you both need access to "staging" functionality.


If you're looking for a way to sync databases between staging / production environments take a look at WP Migrate DB Pro.

You can selectively update tables and even sync media.


I connect directly to the database using Sequel Pro (OS X) which is free. Then I can export the table data as SQL code which will drop and re-create each table. Warning: this would delete any new content on the live site.

  • only export the tables which I need and make sure not to alter the user tables
  • do a search and replace for the domain name

Remember that plugins and themes are not stored in the database so they would have to be copied over separately. You may need to do a search and replace on the table prefix if it has been changed from the default wp_.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.