A database is an organized collection of data. It is a software used to store, organize and retrieve information. A database structure stores data in a tabular format.
WordPress uses MySQL as its database management system. MySQL is a software used to create databases. MySQL is an open source relational database management system used by high profile web properties like Facebook and Youtube.
You require MySQL to install the WordPress on web hosting. All hosting providers offer MySQL in their hosting packages.
During the WordPress installation, it asks you to provide the information like database name, host, username and password. WordPress uses this information to create the tables in your database and stores installation data in tables.
A default WordPress installation creates 12 tables inside your WordPress database. Each table contains different sections, features and functionality of WordPress. Following tables will be created by a default WordPress installation.
WordPress Database Tables:
wp_commentmeta: This table contains comments Meta information about the comments that are posted on WordPress website. It contains meta id, meta key, meta value and comment id.
wp_comments: This table contains comments that are posted on WordPress website. It contains comment author, author URL, author IP, comment date, content post ID etc.
wp_links: This table contains information related to links that entered into the links feature in WordPress.
wp_options: This table contains WordPress admin settings.
wp_postmeta: This table contains post Meta information about the posts and pages that are posted on WordPress website. It contains meta id, meta key, meta value and post id.
wp_posts: This table contains posts and pages that are posted on WordPress website. It contains post name, title, author, status, content, date, type, revisions etc.
wp_terms: This table contains posts categories. WordPress has a powerful taxonomy system, which is used to sort and group the publishing content into sections called terms. Categories and tags are the taxonomies and individual taxonomies are called terms. These terms are stored in this table. It contains term name, slug, group and ID.
wp_termmeta: This table contains term Meta information.
wp_term_relationships: Posts are associated with categories and terms from the table wp_term and this table maintains that relationship.
wp_term_taxonomy: This table describes the taxonomy for the term entries in the wp_terms table.
wp_usermeta: This table contains user Meta information. It contains meta id, meta key, meta value and user id.
wp_users: This table contains user’s information. It contains the username, email, ID etc.
How to Manage WordPress Database?
PhpMyAdmin is open source software that gives the ability to manage MySQL database. PhpMyAdmin installed in web hosting control panel and a user can manage their WordPress Database by logging in their web hosting Cpanel.
To access PhpMyAdmin, login to your web hosting Cpanel and click on PhpMyAdmin under databases section. This will take you to PhpMyAdmin in a new tab.
Now click on databases to see the list of databases that you created. Now click on your WordPress database and it will display your database tables.
You can perform various tasks in PhpMyAdmin such as optimizing and repairing the tables, add and replace table prefix, adding users, changing passwords, deactivating plugins and much more.
Warning: PhpMyAdmin allows you to access your WordPress database directly. There is no undo button in your database. So before making any changes take a backup of your database.
How to create WordPress database backup in PhpMyAdmin?
To create WordPress database backup in PhpMyAdmin, simply click on the export button on the top of the menu in PhpMyAdmin tab.
This will give you 2 methods to export your database.
- Quick – This will quickly export your WordPress database in 1 click.
- Custom – This method displays more options to choose and ability to download your file in a compressed zip or gzip.
We always recommend using a custom method to download WordPress database backup in compressed zip or gzip version. You can also exclude tables from the database backup. The exported file can also be imported using import button in on the top of the menu in PhpMyAdmin tab.
Optimizing WordPress database in PhpMyAdmin:
Databases can store tremendous amounts of information and data that are accessed by queries. We need to optimize the database regularly to reduce the database system size and query execution time.
To Optimize WordPress database in PhpMyAdmin, go to PhpMyAdmin. Click on databases to see the list of databases that you created. Now click on your WordPress database and it will display your database tables.
Now click on check all option to select all tables. Select optimize table option from “with selected” drop-down list next to it. Your WordPress database will be optimized and slightly reduce the size of your WordPress.
There are so many tasks you can perform in PhpMyAdmin but make sure to backup your database before making any changes and don’t do any changes unless it is very necessary.
I hope this article helped you understanding about WordPress database. Please share this article on Facebook, Google + and Twitter.