Using phpMyAdmin in cPanel: manage databases
Open phpMyAdmin from cPanel, browse database tables, run SQL queries, import .sql files, and export database backups.
On this page
phpMyAdmin is a web-based interface for managing MySQL databases. You access it directly from cPanel without needing a separate login. It is the most common tool for importing, exporting, and editing database content for WordPress and other PHP applications.
Open phpMyAdmin
- Log in to cPanel
- Go to Databases → phpMyAdmin
- phpMyAdmin opens in a new tab, automatically logged in as your cPanel user
The left sidebar lists all databases associated with your account. Click a database name to expand it and see its tables.
Browse tables
Click any table name in the left sidebar to browse its rows. Use the toolbar to:
- Browse-view all rows in the table
- Search-filter rows by column value
- Insert-add a new row
- Edit (pencil icon)-edit an existing row directly in the interface
For WordPress: the most commonly edited table is wp_options (site URL, settings) and wp_users (admin accounts). The table prefix (wp_) may be different if it was changed during WordPress installation.
Import a database
-
Create the database first
The database must already exist before you import. Create it in cPanel → Databases → MySQL Databases if you have not already. See Creating MySQL databases in cPanel.
-
Select the database in phpMyAdmin
Click the target database name in the left sidebar to select it.
-
Click Import
Click the Import tab in the top menu bar.
-
Choose the file
Click Browse and select your
.sqlfile. For compressed files, phpMyAdmin supports.sql.gzand.sql.zipdirectly. -
Import
Leave other settings at default and click Go. A success message appears when the import completes.
Export a database
- Select the database in the left sidebar
- Click the Export tab
- Use Quick export method for a standard SQL dump. Use Custom if you want to exclude specific tables or choose a different format (CSV, Excel, XML, etc.)
- Click Go-your browser will download a
.sqlfile
For large databases: use the Custom method and enable compression (gzipped) to produce a smaller file that downloads faster.
Run SQL queries
Click a database in the left sidebar, then click the SQL tab. Type your query in the text box and click Go. Common uses:
-- Find the WordPress site URL
SELECT option_value FROM wp_options WHERE option_name = 'siteurl';
-- Update the WordPress site URL after a domain change
UPDATE wp_options SET option_value = 'https://newdomain.com' WHERE option_name = 'siteurl';
UPDATE wp_options SET option_value = 'https://newdomain.com' WHERE option_name = 'home';
-- Reset a WordPress admin password
UPDATE wp_users SET user_pass = MD5('newpassword') WHERE user_login = 'admin';
SQL UPDATE and DELETE statements modify or remove data permanently. Always export the database first. A single typo in a WHERE clause can modify the wrong rows with no undo.
Repair and optimize tables
Corrupt or fragmented tables can cause application errors. To repair:
- Select the database in the left sidebar
- In the table list, tick the checkbox next to the table(s) to repair, or select all tables
- From the dropdown at the bottom of the list, choose Repair table and click Go
To reclaim disk space from deleted rows, use Optimize table in the same dropdown. This is useful after deleting large amounts of data (e.g., spam comments on WordPress).
Upload size limits
phpMyAdmin enforces an upload size limit based on PHP settings (typically 50–100 MB on shared hosting). For databases larger than this limit:
- Compress the file (
.sql.gz)—phpMyAdmin decompresses on import, so the compressed file is much smaller - Split the SQL file into smaller chunks
- Contact UnderHost support for assistance importing a very large database on shared hosting
- Upgrade to a Cloud VPS or Dedicated Server where you can use the command line:
mysql -u username -p database_name < backup.sql
Related: Creating and managing MySQL databases in cPanel | Database backup and restore-quick reference | Error establishing a database connection-diagnosis and fix | How to install WordPress on UnderHost
Need cPanel hosting or licensing?
Use UnderHost cPanel hosting or add cPanel/WHM to a VPS or dedicated server for familiar website, email, DNS, and database management.





















