Information Technology Reference
In-Depth Information
IV
WordPress creates 10 tables as part of its installation, as follows:
wp_comments —Comments (all of them, including the spam) are stored here. Other information
about comments stored here includes the author of the comment, their email and IP addresses,
and whether the comment was approved by the moderator. You might want to look into this
database table periodically to see where your audience (and your spam) comes from.
wp_links —This basically stores your blogroll and anything else defined in the Links panel.
wp_options —All your settings are stored here.
wp_posts —As you might guess, this is where your posts are stored. You might not guess that
static pages and attachments to posts are stored here, too. This table should be the biggest in
the database (although it's pretty nice when you have a big wp_comments table too).
wp_postmeta —This table stores optional custom fields you can add to your WordPress.org
posts. (Sorry, this isn't available to WordPress.com users.) WordPress also uses this table to lock
an existing post while it's being edited—a good thing when a blog has multiple authors.
WordPress also stores some information here about attachments to posts, such as the path to
the attachment on the server. Plug-ins can also use the table to, among other things, define a
custom field.
wp_terms —This table has the list of Category (for posts
and links) and Tag names. It works with the next two
tables to identify your content.
wp_term_relationships —When you associate a Category
or Tag for a post or link, that information is stored here.
wp_term_taxonomy —A taxonomy is a classification of
terms. In this table, items in the wp_terms table are classi-
fied as Category (for posts), Tag, or Link (category).
wp_users —Critical information about users is stored here,
including username, registration date, and permissions.
Login passwords are also stored here, in encrypted form.
wp_usermeta —As with wp_postmeta, this table stores
information about registered users, including the
biographical information you offered up in the
Administration area.
note
Leonid Mamchenkov offers a
detailed look at the WordPress
database tables, with good
advice on working with them,
here: http://wpbits.wordpress.
com/2007/08/08/a-look-inside-
the-wordpress-database/
Find some updated advice, with
some hands-on work, here:
http://mamchenkov.net/
wordpress/2009/06/24/
understanding-wordpress-
database-in-10-minutes/
PHP Theme Templates
In the previous chapter, we focused on using Cascading Style Sheets (CSS) in creating WordPress
themes. Basically, a theme is composed of at least four PHP files, known as templates, plus
your CSS. These templates constitute and create your theme. The templates are found in the
/wp-content/themes/ <theme-title> folder:
Search WWH ::




Custom Search