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.

General Discussion

WordPress definitions

I am attempting to mimic Zac's procedures of building a site and theme with some of my own work. I came to a point where I wanted to know something about the Table Prefix for setting up the databse. WordPress' reading to me is not the easiest, for instance I just want to know what this mainly is and when I Google it I get a whole bunch of work arounds for things no where in the scope of understanding just what it is, and why would you use certain naming conventions. I don't find the WordPress site to be well written for he who is try to understand basics. I understand WordPress being vast it always forks in the road with information. Zac's training is the first thing I found that explains it really well. Does anybody know of a good WordPress glossary that breaks things down in simple terms? Also why did Zac name his wpWP? Thanks

2 Answers

I'm not 100% on what you're asking, but in regards to 'table prefixes', that's a database convention, not a WordPress one. The default prefix in wp-config.php is wp_. You use a table prefix to distinguish between multiple schemas on a shared database instance. For example, I have one instance of MySQL running on my server, but the server is also hosting 3 domains, each of which use databases, i might prefix the database tables for each site with site1_, site2_, and site3_. This helps differentiate between them if I need to see what's going on with a given table/row.

Incidentally, it is suggest that you NOT use the default wp_prefix for security reasons. (If I know your database tables are prefixed with wp_, it makes it much easier to attack.)

Thank I understand better now. The part about security make sense, I will be aware of that. I guess for working on a localhost it does not mater until you move to production. Thanks