Tag Archives: WordPress Database Tables

What Are the Standard WordPress Database Tables? A Breakdown Of Core WP Tables

A standard WordPress installation creates a set of database tables that store various types of data, such as posts, users, comments, and settings. Apart from this plugins create their tables and some themes may also do that, but deactivating such plugins and themes leaves their tables on your website clattering your database.

In this lesson, you will learn about the main 12 standard WordPress database tables so that whenever you like to clean up your database you don’t disturb the core tables that are the life-line of your WordPress site.

  1. wp_posts – Stores all content types like posts, pages, revisions, and custom post types.
  2. wp_postmeta – Contains metadata (custom fields) for posts, such as additional information like SEO settings or image data.
  3. wp_users – Holds information about all registered users, including username, password, email, and user roles.
  4. wp_usermeta – Stores additional metadata about users, such as permissions, preferences, and profile information.
  5. wp_options – Contains various site-wide settings such as the site URL, admin email, time zone, and installed plugins.
  6. wp_terms – Stores the categories, tags, or any custom taxonomies used to classify content.
  7. wp_term_taxonomy – Describes the taxonomy (e.g., category, tag) for each term from the wp_terms table.
  8. wp_term_relationships – Links posts, pages, or custom post types to their respective terms (categories, tags).
  9. wp_comments – Stores comments on posts and pages, including comment content, user details, and approval status.
  10. wp_commentmeta – Contains metadata about comments, such as IP addresses, ratings, or spam status.
  11. wp_links – Used to manage the blogroll feature, which is now deprecated but still exists in older versions.
  12. wp_actionscheduler_actions (optional in newer WordPress versions) This is used to store scheduled actions or cron jobs, commonly created by WooCommerce and other plugins.

Each table uses a default prefix of wp_.

While installing WordPress manually on your hosting account, a step asks you to enter the database name, database username, database user password, and host and the last field asks for the table prefix which by default isĀ wp_.

This wp_ is the table prefix. this can be changed during installation to enhance security (e.g., mywebsite_) and it also lets you host multiple websites on a single database.

To change the table prefix while installing WordPress using Installatron, in the “Advanced Settings” section, you’ll find an option for “Table Prefix.” By default, the table prefix is set to wp_, but you can modify this to a unique prefix, such as mywebsite_ or any combination of letters and numbers for added security.

After entering your desired prefix, continue with the installation process as usual. This change helps secure your site by preventing common SQL injection attacks that target the default table prefix.