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!
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
Rifqi Fahmi23,164 Points
why we need to create database in wordpress ??
I am still confused why we need to create database ?? and what happen if we don't ??? thanks :)
Jonathan GrieveTreehouse Moderator 91,250 Points
Everything that happens behind the scenes... every post you write, every page you make, every theme you develop in Wordpress is stored in a mySQL database. Every dynamic application has to have a database driving it.
Databases are like "memory" for websites.
Once you set up your database when you install Wordpress it will do the rest. :-)
Kevin Korte28,148 Points
Wordpress won't work. It'll forever error with a Error establishing database connection. It has to have a mysql database to access.
In regards to plugins, plugins can and will add more tables to your database when you activate them, if the plugin needs so. It can run sql commands to do so. Custom post types are stored in the wp_posts table, with all of the other posts. Wordpress tracks a post type in the database, so although all the posts are in one table, wordpress knows the post's type via a column in the database.
Konrad Pilch2,435 Points
If you do some pure PHP , and get into PHP functions and MySQL , you will exactly understand how it works. The WP databse is already made for you by others, as well as lots of the core WP code is written by others.