A site's database
A site keeps its WordPress data in a MariaDB database on its server. The site’s Database tab shows how to connect to it, and a browser for its tables and rows.
Since 0.3.3 A PHP site may have no database. Its tab then says “This site has no database.” and offers Create database.


Connect from the site’s code
Section titled “Connect from the site’s code”The Connection card names the Database, the User, the Host and, on a WordPress site, the Table prefix. Show reveals the password, and the panel logs who asked. Only the sites on the same server can connect. MariaDB has no port open to the internet.
Browse and edit rows
Section titled “Browse and edit rows”- Under Browse, pick a table on the left.
- Choose a column’s name to sort by it.
- Choose a row to open it. Change its values, then choose Save. Delete row removes it.
- Insert row adds a row. Columns left empty take their default.
The panel finds a row by its primary key. A table without one, and a view, are read only here.
Find rows
Section titled “Find rows”Above the rows, pick a column, a comparison and a value, then choose Search.
- Add condition adds another line. Match all keeps the rows that meet every line, and Match any the rows that meet one.
- Any column looks in every column of the table at once, as text, binary ones left out.
- is one of takes values apart by commas:
12, 15, 40. - = with no value finds empty text.
- Clear shows every row again.
Change a table’s structure
Section titled “Change a table’s structure”Structure above the rows lists the table’s columns, indexes and foreign keys, with the forms that change them. New beside the table filter makes a table. See Change a table’s structure.
Edit WordPress’s serialized values
Section titled “Edit WordPress’s serialized values”WordPress stores lists as PHP serialized text, such as the active plugins in wp_options. Such a
value offers Edit as PHP data. Change its entries there, and the panel writes it back with
every length counted again. A length that is off by one byte would empty the whole option.

Run SQL
Section titled “Run SQL”SQL opens an editor. Run, or Ctrl+Enter, runs the statements one after another and stops at the first error. Each statement shows its rows, or how many rows it changed. Recent queries keeps what you ran, in this browser.
A change on this tab empties a WordPress site’s caches. A single SELECT,
SHOW, DESCRIBE or EXPLAIN does not.

Export and import
Section titled “Export and import”- Export downloads a dump of the database as a
.sql.gzfile. - Import loads a
.sqlor.sql.gzfile. It backs the site up first, unless you switch Back up the site first off. - Delete every table in the database first makes it hold exactly what the dump makes.
The site is stopped while a dump goes into its own database. It is started again only if the database then holds a WordPress installation, whether the import worked or failed: without one, anyone could run WordPress’s installer. A dump whose tables have another prefix leaves none, for example. A PHP site is started again whatever the dump held. To undo an import, restore the backup taken before it.
The panel reads the dump before it changes anything. It refuses a file that is not a dump, and a
dump that switches to another database with USE or CREATE DATABASE. With every table of a
WordPress site’s own database deleted first, it also refuses a dump without the site’s options
table, such as wp_options.
Change the password
Section titled “Change the password”Change password gives the database user a new password. WordPress restarts with it, so the site
is offline for a few seconds. The panel refuses when wp-config.php sets the password itself, or
cannot be read. If the site stops answering with the new password, the old one is put back.
On a PHP site, nothing restarts, and the site’s own config keeps the old password. Show reveals the new one. Put it in the config, or the site loses its database.
A container app whose environment names {{db.password}} gets a new
container with the new password, behind its health check. If that fails, the old password is put
back. An app that reads its password from its own config is like a PHP site.
What the browser can reach
Section titled “What the browser can reach”Every query runs as the site’s own database user. MariaDB keeps it to that site’s databases, so it cannot see another site’s data or MariaDB’s own users. An import runs as that user too, and a dump cannot run commands or read files on the server.
Open it in Adminer
Section titled “Open it in Adminer”Adminer beside a database opens it in Adminer in a new tab, for what this tab does not do.
Limits
Section titled “Limits”- A statement runs for at most 50 seconds from the SQL editor, and 20 seconds while browsing.
- The SQL editor shows the first 1,000 rows of a result, then stops the statement.
- A value over 1 MiB, and binary data, can only be changed with SQL.
- An import takes up to 4 GB, compressed, and up to two hours to load.
- A view, trigger or routine in a dump whose
DEFINERis another database user does not load. Remove theDEFINERclauses first. - Changes wait while a restore, import or move runs on the site. A backup does not block them.