Databases

Edit, delete, optimise and repair database tables in phpMyAdmin (cPanel)

Open phpMyAdmin from cPanel to edit rows, empty or drop tables, and run Optimize, Check and Repair table to reclaim space and fix crashed tables safely.

IntermediatecPanel hosting2 min read

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

Open the database in phpMyAdmin

  1. Open cPanel → Databases → phpMyAdmin. It opens in a new tab and logs you in automatically.
  2. In the left panel, click the database name (for example mdmuser_wp) to list its tables.

Edit a row

  1. Click the table name, for example wp_options, to see its rows in the Browse tab.
  2. To find a row quickly, use the Search tab or the filter box above the results.
  3. 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

  1. Open the database so all tables are listed in Structure.
  2. Tick the table(s).
  3. From With selected, choose Empty to remove all rows but keep the table, or Drop to delete the table completely.
  4. 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.

  1. In Structure, click Check all (or select Check tables having overhead).
  2. 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:

  1. Select the affected tables in Structure.
  2. Choose Check table from With selected and read the result.
  3. 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.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.