6. WordPress Database and Queries
This module covers WordPress data access through APIs first and direct SQL only when necessary.
Lessons
- WP_Query, Metadata, and Options — use WordPress data APIs correctly
- wpdb and Custom Tables — run safe direct SQL when APIs are not enough
- Data Migrations and Versioned Schema Changes — update options and tables safely over time
Database Rule
Prefer WordPress APIs. Use direct SQL only when the API cannot express the query or when a custom table is the right design.
What's Next
- Continue to 7. AJAX, REST, and Forms