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

Alex Flores
Alex Flores
7,864 Points

How does Wordpress Database work?

Hello all,

I feel like I should know this, but I don't. I'm using WordPress and Git. I made some changes to my theme and then I tried to git commit, but git said there weren't any changes made. So then I thought, well the changes must have been stored on the database. Is this true? And if so, why are html/css/javascript/php changes being stored on the database and not the actual files?

I feel like I'm missing something big here.

Thanks!

2 Answers

Sue Dough
Sue Dough
35,800 Points

The database is irrelevant to what’s going on. Brent is correct. You need to add your files before committing.

I usually do this:

git status

This will show me whats been changed if anything

Then I run

git add -A

which will add all the files. You can do 1 file at a time like Brett mentioned but thats a pain in the ass on bigger projects.

Then once your done just

git commit -m "my first commit"

Brett Smith
Brett Smith
4,261 Points

Are you tracking those files?

git add filename