« Back to Glossary Index

SQL, Structured Query Language, is the standard language used to communicate with and manage relational databases — retrieving, inserting, updating, and deleting data. WordPress's MySQL database is queried using SQL, even when a user never sees or writes any of it directly.

  • SELECT — retrieves existing data from a database
  • INSERT — adds new data into a database
  • UPDATE — modifies data that already exists
  • DELETE — removes existing data from a database

`SELECT post_title FROM wp_posts WHERE post_status = 'publish'` retrieves the titles of every currently published post — a small, direct illustration of the pattern nearly all SQL queries follow.

Most WordPress users never need to write SQL directly — WordPress's own PHP functions handle nearly all standard database interaction automatically, behind the scenes.

« Back to Index
Share This