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

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