Each of our sessions are digitally broadcast live and feature world-class speakers. Each presentation typically has 30-40 minutes set aside for instruction followed by another 15 minutes or so for Questions & Answers at the end.
About This Session
We often hear about WordPress core in reference to the code base, but at the true core of WordPress is its database. The database design that supports all WordPress code make it easy for developers to extend the WordPress platform and build truly amazing websites.
There’s just one shortfall, though – very few people take the time to get to know the database.
During this presentation, we’re going to go on a deep dive into how the WordPress database is structured as well as how that relates to the codebase. Specifically, we’re going to look at a clear and easy-to-understand look at how the database structure fits the different methods and strategies that data architects live by.
After we’ve got a firm grasp on the lay of the land, we’re going to look at how the default WordPress database schema can be utilized for custom features. Many things fit nicely without needing to make any changes to the database whatsoever; some things may be best served by custom tables. We’ll talk about where to draw the line and how to make that decision.
With a firm understanding of the database’s role we’ll look at how it relates to the standard WP Query and The Loop™. This functionality is integral to WordPress and drives how literally every URL request gets served by WordPress (when hitting uncached URLs, that is). Once we’re settled on standard behavior we’ll also look at how the $wpdb class can be used to run any number of custom MySQL operations on a site.
Finally, we’ll circle back on creating custom tables and review some best practices. MySQL supports a large variety of data types and, if you’re not intimately familiar with them, it can be difficult to choose the best type for what you’re storing. We’ll also talk about striking a balance between tables that have long rows (many columns) versus smaller tables that share relatable data.
There is much to cover here, thanks to the versatility of WordPress. You’re bound to learn something valuable whether you’re just getting into development or you’ve been working with WordPress and MySQL for years.
What You’ll Learn
- The structure of the WordPress database and its relationship with WordPress core.
- How the structure of the WordPress database fits in with methodologies employed by data architects.
- How the tables in the database can be utilized for custom features.
- How the database relates to the The Query and The Loop
- How to access the database directly using the
- Best practices for use of the database for custom solutions.
About Benjamin Cool
Ben has over 18 years in web development experience, a Masters Degree in Computer Science and a Graduate Certificate in Artificial Intelligence. Currently, Ben is working for General Motors as an Autonomous Vehicle Technology Developer. Previously Ben served as the Application Optimizer at A2 Hosting where he focused on building tools for improving web application performance. Ben lives in Michigan with his wife and three children and enjoys driving on the dunes at Silver Lake when he gets the chance.