Here at Delicious Brains we eat, drink and sleep databases. However, we believe that anyone working with WordPress should have some level of knowledge about the database that sits behind a site. So I have put together a description of all the tables and their columns present in the WordPress database, and in doing so learnt a couple of new things myself. In this tour I will focus on the tables for a standard single site install of WordPress and all of the tables will be referred to using the default prefix of ‘wp_’. However, for security reasons it is recommended to use a different prefix when installing your WordPress sites. The Tables wp_posts The posts table is arguably the most important table in the database. Its name sometimes throws people who believe it purely contains their blog posts. However, albeit badly named, it is an extremely powerful table that stores various types of content including posts, pages, menu items, media attachments and any custom post types that a site uses. The table’s flexible content nature is provided by the ‘post_type’ column which denotes if the row is a post, page, attachment, nav_menu_item or another type. But this flexibility also makes it hard
Share This