最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

database - Ways of managing staging and production wordpress sites?

programmeradmin1浏览0评论

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

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

Share Improve this question edited Oct 13, 2016 at 10:35 Alex Reds asked Feb 17, 2015 at 20:48 Alex RedsAlex Reds 1791 silver badge7 bronze badges 1
  • Take a look at roots.io – wharfdale Commented Jan 3, 2020 at 12:01
Add a comment  | 

3 Answers 3

Reset to default 1

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.

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_.

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.

发布评论

评论列表(0)

  1. 暂无评论