£ GBP

Databases: What They Are and How to Manage Them Print

  • 0

What a database actually is

A lot of website owners have a database without ever really knowing what one is, so here it is plainly. A database is where a website stores information that changes: your WordPress posts and pages, your online store's products and orders, your users, your settings. The website's files are the machinery; the database is the content and the memory. When someone visits, the site pulls what it needs from the database and builds the page.

Static sites, plain HTML pages, need no database at all. But WordPress, WooCommerce, ThirtyBees, and most modern systems all keep their content in one, which is why "your website" is usually really two things: the files, and the database behind them. It is also why our articles on backups and migrations stress moving both, one without the other is half a website.

You may never need to touch it

Worth saying early: for most people, the database looks after itself. Install WordPress and it creates and manages its own database from then on, you work in the WordPress dashboard and never think about the database underneath. You would only come here directly to create a database for a manual installation, to help a developer, or to follow a specific instruction. If none of those apply, you can happily leave this to the software.

Creating a database

When you do need to make one yourself, perhaps installing an application by hand, cPanel provides the tools under its Databases section. The process has three parts, and the third is the one people forget:

  1. Create the database itself, giving it a name. The MySQL Database Wizard in cPanel walks you through the whole thing in order if you would rather be guided.
  2. Create a database user with a strong password. The database and the user are separate things, a common surprise the first time.
  3. Add the user to the database, granting it access. A database and a user that have not been linked cannot talk to each other, and this missed step is behind a great many "it won't connect" problems.

Whatever application you are installing will ask you for these four details: the database name, the username, the password, and usually the host, which is normally "localhost" on our servers. Keep them safe as you create them, you will need to type them into the application exactly.

phpMyAdmin: looking inside

phpMyAdmin, also in cPanel's Databases section, is the tool for viewing and working directly with what is inside a database. It is powerful, and that cuts both ways: it is how a developer inspects data or runs a repair, and it is also how a careless click deletes something important. Treat it with respect.

Two genuinely useful, lower-risk things you might do in phpMyAdmin:

  • Export a database as a backup before a big change, a manual safety copy of your content, complementing the fuller backups our backups article covers.
  • Reset a WordPress admin password when the email route has failed, as described in our article on logging in to WordPress, one of the few times an ordinary user has a good reason to open phpMyAdmin.

Beyond those, if an instruction has you editing tables or running commands directly and you are not certain what they do, stop. This is exactly the point where a support ticket is the wise move, a wrong change to a database is not always reversible, and we would far rather help before than untangle after.

Good to know

The single most important thing to know about your database is that it holds your actual content, so it is the half of your website you most cannot afford to lose. Any backup worth the name includes the database, not just the files, which is why our backup guidance keeps stressing both, and why a cPanel full backup, which captures everything together, is the simplest safety net. If you take one habit from this article, let it be that: when you back up, back up the database too, because the files can be rebuilt and the content, once gone, often cannot.


Was this answer helpful?

« Back

Powered by WHMCompleteSolution