Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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!