对包含 MediaWiki 和 WordPress 安装的网站开发项目进行版本控制的好方法是什么?
我正在尝试找出包含 MediaWiki 和 WordPress 安装的网站的版本控制程序。我刚刚开始思考这些问题,可能问得太快、太模糊了。
假设网站根目录是
~/public_html
有各种静态 HTML 页面
~/public_html/page1.html
~/public_html/dir/page2.html
...
并且安装了 MediaWiki
~/public_html/wiki/
和 WordPress
~/public_html/blog/
以及可能的其他具有数据库后端的 Web 应用程序。
有几个问题我不清楚
如果我使用 Subversion,我的第一步是什么?由于我已经在我的 Web 服务器计算机上运行了 /public_html,我是否需要先将完整的 /public_html 下载到我的本地开发计算机,然后将其作为项目提交到我的 svn 服务器(单独)?我还有其他使用 Subversion 进行版本控制的软件项目。
如果我使用 Subversion ,当我部署时,我是否只需签出,即服务器使用的网站将是存储库的工作副本? MediaWiki 和 WordPress 的版本是否正确?另外 .svn 目录又如何呢?这不会暴露吗?
除了 /public_html 中的文件的版本控制之外,如何以与 public_html 中的文件简化的方式备份数据库?
如果我使用 Mercurial,我可以使用 public_html 作为存储库,并且不一定需要克隆存储库?
I am trying to figure out version control procedures for a website that includes MediaWiki and WordPress installations. I just started thinking about these and am probably asking too quickly and vague questions.
Say the website root is
~/public_html
There are various static HTML pages
~/public_html/page1.html
~/public_html/dir/page2.html
...
And there are installations of MediaWiki
~/public_html/wiki/
and WordPress
~/public_html/blog/
and possible other webapp that have database backend.
there are a few questions not clear to me
If I use Subversion, what's my first step? As I already have a /public_html running on my web server machine, do I need to download the complete /public_html to my local development computer first and then commit it to my svn server (separate) as a project? I have other software projects that are version controlled using subversion.
If I use Subversion , when I deploy, do I just check out, i.e. the website that's used by the server will be a working copy of the repository? Will the MediaWiki and WordPress be properly versioned? Also what about the .svn directories? Won't that be exposed?
besides version control the files in /public_html how do I backup databases in a way that's streamlined with the files in public_html?
If I use Mercurial instead, I can use public_html as the repository and don't necessarily need to clone out a repository?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我使用源代码控制、脚本和部署程序来管理一些 Web 应用程序项目,例如 WordPress、phpbb 和自定义 Web 应用程序。多年来,我改进了这些框架,现在我有了一个似乎对我来说很有效的框架,因此它可能适合面临类似挑战的其他人。
以下是有关总体策略的一些一般要点:
因此,为了回答你的一些问题,我会反过来做。从开发计算机上的工作环境开始(配有 Web 服务器和数据库)。让您的应用程序在那里运行并进行测试。根据需要将更改提交到本地存储库。应用程序准备好部署后,运行部署脚本以自动更新生产站点。
我的部署脚本执行如下操作:
就是这样,一旦脚本就位,部署就变得很有趣。运行脚本,进入实时服务器以查看一切正常,完成。
希望这有帮助。
I am using source control, scripts and deployment procedures to manage few web application projects like wordpress, phpbb and custom web applications. Over the years, I refined these and now I have a nice framework that seems to work well for me, so it may suit others facing similar chalenges.
Here are some general points about the overall strategy:
So, to answer some of your questions, I'd do it the other way around. Start with a working environment on your development machine (complete with web server and database). Have your applications work and tested there. Commit changes to the local repository as needed. Once the application is ready for deployment, run the deploy script to automatically update the production site.
My deploy script do something like this:
That's it, once the script is in place deployment becomes fun. Run a script, go the the live server to see everything works, done.
Hope this helps.