[英]How to deploy WordPress content from Dev to Staging to Production environments?
We inherited a WordPress website and set up Dev, Staging and Production environments.我们继承了一个 WordPress 网站,并设置了 Dev、Staging 和 Production 环境。 Deploying code changes to each environment (eg going from Dev to Staging) has been simple to do by putting the code in Git.
通过将代码放在 Git 中,可以很容易地将代码更改部署到每个环境(例如从 Dev 到 Staging)。
However, we're not sure how to do the same with WordPress content that lives in the database and files in the wp-content/uploads directory.但是,我们不确定如何对数据库中的 WordPress 内容和 wp-content/uploads 目录中的文件执行相同的操作。
We'd like to use our Dev site as the source of truth, prepare content changes in there, and then deploy those content changes to Staging and Production, just like we would do with code.我们希望使用我们的 Dev 站点作为事实来源,在那里准备内容更改,然后将这些内容更改部署到 Staging 和 Production,就像我们处理代码一样。
Some of the situations we have to handle:我们必须处理的一些情况:
wp_posts
table.wp_posts
表之外实时部署更改。 For example, if we change menus in Appearance > Menus, that's stored elsewhere in the WordPress DB.Is there a standardized way to handle a content deployment pipeline in WordPress from Dev to Staging to Production?是否有一种标准化的方法来处理 WordPress 中从开发到登台再到生产的内容部署管道?
We're looking at plugins, but none of them seem to achieve this to a full extent.我们正在研究插件,但似乎没有一个能完全实现这一点。
Thanks谢谢
You're looking for an ETL (Extract - Transform - Load) script most likely.您最有可能正在寻找 ETL(提取 - 转换 - 加载)脚本。 It would pull the tables you want.
它会拉出你想要的桌子。 Extract -
提炼 -
Or you could probably take all tables excluding:或者您可以将所有表格排除在外:
Then run a search and replace for absolute urls.然后运行搜索并替换绝对网址。
Finally load the tables into the next environment.最后将表加载到下一个环境中。
You can write it manually or use a program like Talend Open Studio for Big Data您可以手动编写或使用Talend Open Studio for Big Data 之类的程序
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.