Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Using github with a WordPress install, which files to track?

Hi everyone,

I am just looking for some advice on how to approach using github to track the updates and changes on a WordPress install.

Do I simply track the child theme?

Do I track the child theme and any plugins I personally create?

Do I track the full WordPress install ?

Any guidance is greatly appreciated :)

Craig

1 Answer

Hey Craig,

Terrific Question -- I've often considered the same thing. My first thought would be to track everything in the wp-content directory, since this is home to the theme and plugin files which you will likely update.

You could track the entire root directory, but be careful not to include sensitive files like wp-config.php, which hold credentials to connect to your SQL server, especially if you use a public repo.

While we're talking about databases, keep in mind that Git is a great way to keep up with changes in your file system but will do little or nothing to aid with changes in your DB. I'm sure there are plugins available to aid with this task as well.

I researched this a bit, and I came across a blog post that I think would be a great starting point. I hope this helps!

Either way, creating a simple WordPress workflow is a great project and I hope you report back to the forum with what you learned -- it could be a great course in the future.

Good Luck!