1

So what is the best process for setting up a large community site using WordPress with git version control? Multiple people submitting changes etc, testing area and easy way to update the live site. How would you do it?

1
  • Close-voted as not a real question: "This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form." Commented May 1, 2012 at 15:40

2 Answers 2

4

The most prudent way is to use a staging server.

The workflow would be:

  • DVCS (git, mercurial)
  • Remote repository for multiple users (self hosted, github, bitbucket, etc,).
  • Staging server, push master files to.
  • If all is good send the files from staging to live.

Some Notes:

Have only one/two people actually manage the master push to the staging server, this allows them to review changes and have a certain amount of control over what goes on, also it is way less confusing.

This is strictly for code changes, content based changes are way more complex and would need several other "layers" to ensure database compatibility/sync.

Sending from staging to live is a topic in of itself, you can use automated tools, ftp, even DVCS itself, it really depends on your environment.

An alternative is to use a PHP based PAAS servive ( there are now several), they can automate much of this process, I recently reviewed them all and each one has a different feature set and quirks ( most of these services are really new).

For example here is a really boring video I made on syncing a live site through github ( using Engine Yard), the downside is that this service has no actual file server and in the long run made it very difficult to work with, but some PAAS services do support this.(I think they are adding it soon as well) http://www.youtube.com/watch?v=8ZEiFi4thDI

1

If i don't misunderstand, you have a team. Your teammates changing your Wordpress' codes. For example; developing plugins, themes, changing WP core files etc.

So you can add your WP directory to git directly.

If git installed to your server, go to your WP root directory via ssh connection. And then, execute

git init

This will initialize a git repo to this dir. And then add all files

git ADD *

And then send your first commit :

git commit -m 'first version'

Now your teammates can get repo with

git clone http(s)://www.domain.com/wordpress-path/.git/your-git-repo-file.git

NOw everyone can modify your Wordpress and commit their changes to server.

2
  • What I don't understand is how git interacts with your IDE. Say i'm developing on Dreamweaver, and I switch branches, my IDE isn't going to reflect that so how do I get the two aligned? Plugins? = more complicated than simple FTP sync ...
    – AlxVallejo
    Commented Aug 21, 2012 at 18:32
  • @AlxVallejo , it's interacts with your files. When you checkout a version of your project. Your all files changed with that version's file. So when you refresh your files (just close and open again) in Dreamviewer, you'll see new content of files.
    – Eray
    Commented Aug 25, 2012 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.