Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
25 Million+
Websites using our plugins
Years of WordPress experience
WordPress tutorials
by experts

What is: MariaDB

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

MariaDB is one of the database management systems that WordPress can use to store and retrieve your blog information. It is an alternative to the popular MySQL database application.

WordPress uses a database as a filing cabinet for your website. It contains your posts and pages, comments, many settings, and much more.

You can use WordPress without knowing how the database works behind the scenes, but having a basic understanding is helpful when troubleshooting problems with your WordPress site.

Glossary: MariaDB

What Is a Database?

MariaDB is a relational database management system that runs on your WordPress hosting server and handles multiple users and databases. This means that it acts as a digital filing cabinet that organizes and stores your website data in different tables.

It works the same way as MySQL and is fully compatible with WordPress, so you can use either database application with WordPress. Typically, the choice of database software is made by your WordPress hosting provider.

Both applications use a programming language called SQL, or Structured Query Language. Pronounced ‘sequel’, it is used to retrieve, add, and delete information from the database tables.

A SQL instruction to retrieve data is known as a query, and it typically looks something like this:

SELECT * FROM wp_posts WHERE ID = 23;

You don’t need to have coding skills or database knowledge to use WordPress. All of this happens automatically behind the scenes.

But with some basic knowledge of SQL, more advanced users can fix many WordPress errors by working directly with the database, such as:

This is especially helpful when you’re unable to log in to the WordPress admin area. In that case, you can gain direct access to your WordPress database using phpMyAdmin.

This is a web application you will find in your web hosting provider’s control panel. You can use it to manage your WordPress database from your web browser.


You can learn more about databases and how to use them in our beginner’s guide on WordPress database management with phpMyAdmin.

What Is the Difference Between MySQL and MariaDB?

The MySQL database application has a long history. It was first released in 1995 and quickly gained traction as a fast, efficient, affordable database management application.

When WordPress was launched in 2003, it chose MySQL to manage its database.

It is currently owned by Oracle Corporation. It is open-source software licensed under the GPL and is available free of charge.

When MySQL was acquired by Oracle in 2009, a community of developers created a fork of the software. They called this new open-source project MariaDB.

With MariaDB, they could continue working on the database independently of Oracle while Oracle oversaw the ongoing development of MySQL.

Since then, new features have been added to MariaDB that are not in MySQL, and the team has improved its performance. However, it remains completely compatible with MySQL.

We switched this blog to MariaDB in 2019 to take advantage of the performance benefits and speed up the WPBeginner website.

How Does WordPress Use Its Database?

Most of your WordPress data is stored in database tables. This includes posts, pages, comments, categories, tags, custom fields, users, and other WordPress settings.

You might remember providing information to set up the database when you first installed WordPress. You were asked to provide a database name, host, username, and password.

Provide a Database Name, Host, Username and Password

This information about the WordPress database is stored in the wp-config.php configuration file.

WordPress used the information you provided to create database tables and then created the default installation data inside those tables.

There are 12 database tables created with a default WordPress installation:

  • wp_commentmeta contains meta information about comments.
  • wp_comments contains comments and the comment author’s details.
  • wp_links manages blogrolls created by earlier versions of WordPress.
  • wp_options contains most of the site-wide WordPress settings.
  • wp_postmeta contains meta information about posts, pages, and custom post types.
  • wp_posts contains your posts, pages, custom post types, and revisions.
  • wp_termmeta contains metadata for terms under custom taxonomies.
  • wp_terms contains terms under taxonomies, such as each category and tag.
  • wp_term_relationships manages the relationships between post types and terms.
  • wp_term_taxonomy defines taxonomies to differentiate between categories and tags.
  • wp_usermeta contains meta information about registered users.
  • wp_users contains user information including usernames and passwords.

You will notice that each table starts with the prefix  wp_. We recommend you choose a different prefix during the WordPress installation to improve the security of your website.

Now, because your important WordPress content is stored in the database, it needs to be backed up regularly, along with the files stored in your media library, themes, and plugins.

Backup plugins like Duplicator automatically back up your files and database tables and store them safely in a remote location. We recommend you follow our guide on how to back up your WordPress site.

Running MariaDB on Your Computer

If you want to run WordPress locally on your computer, then it needs to run the software WordPress relies on. This includes a database management application like MariaDB or MySQL as well as web server software like Apache and the PHP programming language.

It is difficult to set up all of those applications separately, so solutions have been developed to easily install WordPress on Windows and Mac.

One of these solutions uses MariaDB, and that is XAMPP.


XAMPP runs on Windows, Mac, and Linux, and you can learn to install it by following our guide on how to create a local WordPress site using XAMPP.

We hope this article helped you learn more about MariaDB in WordPress. You may also want to see our Additional Reading list below for related articles on useful WordPress tips, tricks, and ideas.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Additional Reading

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!