phpMyAdmin is a web interface for your MySQL and MariaDB databases. Besides importing and exporting, it lets you edit individual rows, remove tables you no longer need and run maintenance such as Optimize and Repair. These actions change data directly, so a backup always comes first.
Before you start
- Access to cPanel.
- A fresh export of the database. See export a database with phpMyAdmin.
Open the database in phpMyAdmin
- Open cPanel → Databases → phpMyAdmin. It opens in a new tab and logs you in automatically.
- In the left panel, click the database name (for example
mdmuser_wp) to list its tables.
Edit a row
- Click the table name, for example
wp_options, to see its rows in the Browse tab. - To find a row quickly, use the Search tab or the filter box above the results.
- Click Edit on the row, change the value and click Go.
You can also double-click a single cell in Browse to edit it in place. Be careful with serialized values (text that starts with a: or s:); changing their length breaks them. Use a search-replace tool for those, see search and replace in WordPress.
Empty or delete a table
- Open the database so all tables are listed in Structure.
- Tick the table(s).
- From With selected, choose Empty to remove all rows but keep the table, or Drop to delete the table completely.
- Confirm with Yes.
Important: Drop and Empty cannot be undone in phpMyAdmin. Only remove tables you are sure are unused, such as those left behind by a deleted plugin with a known prefix.
Optimise tables
Optimise rebuilds a table and reclaims space left by deleted rows, which helps after cleaning up spam comments, logs or revisions.
- In Structure, click Check all (or select Check tables having overhead).
- From With selected, choose Optimize table.
On InnoDB tables you may see Table does not support optimize, doing recreate + analyze instead. That is normal and means it worked.
Check and repair tables
If a site reports errors such as Table is marked as crashed and should be repaired:
- Select the affected tables in Structure.
- Choose Check table from With selected and read the result.
- If a table is not OK, select it and choose Repair table.
Repair works on MyISAM and Aria tables. InnoDB tables recover automatically or need a restore; see repair corrupted InnoDB tables, or contact support and we can restore the database from the daily JetBackup copy.
Troubleshooting
- phpMyAdmin times out on large tables: work in smaller batches or ask support to run the operation.
- #1142 command denied: the operation needs privileges your account does not have, for example creating triggers in some setups; contact support.
- Site still broken after repair: restore the last good backup.
