How to use phpMyAdmin
Opening phpMyAdmin from your control panel and using it to browse, edit, import and export a database.
phpMyAdmin is a browser-based tool for working directly with a MySQL or MariaDB database — the kind of database that sits behind WordPress and most other content management systems. Rather than writing SQL commands from scratch every time, it gives you a visual way to browse tables, edit individual rows, run queries when you need to, and move data in and out with import and export.
Opening it
phpMyAdmin is usually reached from the database section of your control panel, alongside the tools for creating databases and database users. Opening it from there connects you automatically using your hosting account's own database access — you should not need to enter separate login details, since the panel has already authenticated you.
The list of databases shown reflects what your hosting account has permission to see, not every database that might exist on the wider server. This is normal and expected on shared hosting — it is the same account isolation that keeps your data separate from anyone else's.
Finding your way around
The database list sits down the left-hand side. Selecting one shows the tables inside it, and selecting a table shows its structure and its data. For a typical WordPress site, for example, you would find tables such as one for posts, one for options, and one for users, each holding a different slice of the site's content and configuration.
Browsing and editing data
Clicking into a table shows its rows in a grid. From there you can:
- Browse — view the actual data, page by page if the table is large.
- Edit a row — change individual field values directly, useful for a quick fix such as correcting a setting stored in the database without going through the application's own interface.
- Delete a row — permanently, with no undo. Be certain before confirming.
- Insert a new row — occasionally useful, though most application data is normally created through the application itself rather than by hand.
Editing or deleting data through phpMyAdmin takes effect immediately and cannot be reversed from inside the tool itself. Export a copy of the database, or at least the specific table, before making any change you are not completely confident about — particularly before deleting rows or running a query that affects more than one row at once.
Running a query
The SQL tab lets you run a query directly against the selected database — useful for something more specific than the browse-and-edit interface easily supports, such as finding all rows matching a particular condition. A basic example, finding a user by their email address in a typical WordPress users table:
SELECT * FROM wp_users WHERE user_email = 'name@example.com';
If you are not confident writing SQL, stick to the browse and edit screens for routine changes — they cover the great majority of what most site owners ever need to do, without the risk of a mistyped query affecting more rows than intended.
Exporting a database
Select the database, open the export tab, and choose a format — SQL is the standard choice, producing a single file containing every table's structure and data. This is the file you would keep as a backup, move to another host, or hand to a developer who needs a copy of your data to work with locally. See how to export a database for the detail on export options.
Importing a database
To bring data into a database — restoring a backup, or moving a site's content from elsewhere — select the target database first (create an empty one if you do not already have one, see creating a database), open the import tab, and upload the SQL file. Importing into a database that already has data in it can conflict with what is already there, so import into an empty database unless you specifically intend to add to existing content.
phpMyAdmin's own upload has practical limits on file size and how long an import can run before timing out. If your database dump is large — many tens of megabytes upward is a reasonable point to start being cautious — see how to import a database too large for phpMyAdmin for a method that avoids the browser upload limit entirely.
Common mistakes
- Editing the live database with no backup taken first. The single most avoidable cause of "I broke my database" — export first, then make the change.
- Importing into the wrong database. Double-check which database is selected before importing, especially on an account with more than one.
- Running a query that affects far more rows than intended. A query without a specific enough condition can update or delete far more than expected — review a query carefully, and where possible run a
SELECTfirst to see exactly which rows it would affect before running the equivalentUPDATEorDELETE.
Frequently asked questions
Is phpMyAdmin safe to use?
Yes, for the everyday jobs it is designed for — browsing data, running a query, importing or exporting. The main risk is human error rather than the tool itself: it gives you direct access to edit and delete data with no undo, so back up before anything you cannot easily reverse.
Why does my import fail on a large file?
phpMyAdmin's web-based upload has practical size and time limits. For a database dump too large to import this way, see how to import a database too large for phpMyAdmin for an alternative method.
Related reading
Creating a database and a database user, and where to find the connection details afterwards.
How to import a database with phpMyAdminPoint phpMyAdmin at a SQL file and it rebuilds the database from it — provided the file is small enough for a single upload.
How to export a databaseTurn a live database into a single portable SQL file, ready to back up, move, or hand to a developer.
A tour of your hosting control panelThe main sections you will find in your control panel and roughly what lives in each one.