安装主题的版本控制WordPress网站(Version Control WordPress Website with themes installed)

编程入门 行业动态 更新时间:2024-10-24 12:34:14
安装主题的版本控制WordPress网站(Version Control WordPress Website with themes installed)

成为Wordpress开发生态系统的新手很少有我目前偶然发现的问题。 安装了wordpress,它按预期工作。 最近在网站上安装了一个主题到当地的工作副本。 此外,还向团队中添加了2名成员,这些成员之前是单人,因此使用bitbucket服务器存储库控制代码版本。

现在,问题在于新开发人员将远程存储库克隆到他们的本地计算机(具有已安装主题的整个wordpress)可用。 但由于添加的新页面/链接/菜单/图像不能反映其他本地的,因此它无法正常工作。

想知道版本控制Wordpress时需要遵循的一般thumbrules。 添加的主题/附加代码更改文件等是否只需要版本控制而不是整个Wordpress文件? 在我的场景中,我需要做的改变是什么(我需要配置以获取最新的存储库代码以在本地运行的任何文件)我们是否需要版本控制Wordpress包括数据库? 请指教。

Being new to Wordpress development ecosystem have few queries which I m stumbled upon currently. Have installed wordpress and it was working as expected. Had installed a theme to the website recently to the local working copy. Also, added 2 more members to the team which was previously single person and thus made the code version controlled with bitbucket server repository.

Now, the issue is when the new developers cloned the remote repository to their local machine ( entire wordpress with installed theme ) is available. But its not working properly as the new pages/links/menus/images added are not reflecting for the other's local .

Would like to know the general thumbrules which needs to be followed while version controlling Wordpress. Is the added themes/additional code changed files etc. only need to be version controlled instead of the whole Wordpress files? In my scenario what would be the changes I need to do ( any files which I need to configure to get the latest repository code to run locally ) Would we need to version control the Wordpress including the Database? Please advise.

最满意答案

是的,你遇到的主要问题是你想要的所有东西都在数据库中。 db有版本控制的东西,但不确定它们的最佳工作方式......所以你可以导出并与它们共享数据库,或者从服务器中远程数据库中完成所有工作。 您可以在wp-config中更改数据库凭据,包括IP地址等。

至于版本控制,我只将我的主题保存在git和wp-config等中......我可以尽我所能。 然后我使用composer https://getcomposer.org/来引入wordpress并使用https://wpackagist.org/来获取插件。

Roots对作曲家和WordPress做了很好的介绍 - 我开始学习并值得一看: https : //roots.io/using-composer-with-wordpress/

Yes the main issue you have there is all the things you want are within the database. There are version control things for db but not sure how best they work... so you either export and share you db with them, or all work off a remote db from a server. You can change db credentials, including ip address etc in wp-config.

As for version control, I only save my theme in git and the wp-config etc etc... the bare minimum I can. Then I use composer https://getcomposer.org/ to pull in wordpress and make use of https://wpackagist.org/ to get plugins.

Roots did a nice introduction to composer and WordPress - where I started learning from and is worth a look: https://roots.io/using-composer-with-wordpress/

更多推荐

本文发布于:2023-08-05 04:26:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1428535.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:版本   主题   网站   WordPress   Version

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!