部署wordpress数据库设置而不是内容 [英] deploy wordpress database settings and not content

查看:107
本文介绍了部署wordpress数据库设置而不是内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将wordpress数据库设置部署到生产而不必迁移整个数据库的最佳方式是什么?我使用的是git和 https://github.com/wp-cli/wp-cli。如果我有一个开发分支检出需要将其并入master,则必须有一种方法来部署数据库设置,而不必迁移包含内容的完整数据库。在Drupal中有一个称为特征的模块来处理这个过程。对于多个开发环境中的wordpress部署过程的任何建议将是非常棒的。

What is the best way to deploy wordpress database settings to production without having to migrate the entire database? I am using git and https://github.com/wp-cli/wp-cli. If I have a development branch checkout out need to merge this back in to master, there must be a way to deploy database settings without having to migrate the full database including content. In Drupal there is a module called 'Features' which handles this process. Any suggestions regarding wordpress deployment processes across multiple development environments would be fantastic.

推荐答案

您无法定义module,WordPress术语是插件,在 wp-config.php 插件设置存储在表_options表中,但一些插件使用多行,其他插件创建整个新表。

You can't define "module", WordPress term is plugin, in wp-config.php The plugin settings are stored in the table _options table, but some plugins use multiple rows, others create entire new tables.

如果插件没有导出/导入设置的选项,您几乎可以忘记它。您必须挖掘代码才能找出DB中行的名称,并且插件创建新表。

If the plugin doesn't have the option to export/import the settings, you can almost forget about it. You would have to dig in the code to figure out the names of the rows in the DB and if the the plugin creates new tables.

这篇关于部署wordpress数据库设置而不是内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆