How To Manage Databases in cPanel with phpMyAdmin Updated on December 31, 2025 by Carrie Smaha 10 Minutes, 36 Seconds to Read phpMyAdmin is a web-based tool for managing MySQL and MariaDB databases. While cPanel’s MySQL Databases tool handles creating databases and users, phpMyAdmin is where you work with the data itself: browsing tables, running queries, importing backups, and fixing corrupted records. This guide covers the phpMyAdmin interface, explains what each menu tab does, and walks through common tasks like backing up your database before a WordPress update or fixing broken URLs after migrating to a new domain. Before You Start Database changes are permanent. There’s no undo button, no revision history, and no confirmation prompt for most destructive actions. Before making any changes in phpMyAdmin: Export a backup of your database using the Export tab. If you’re editing a WordPress or CMS database, also create a full site backup through cPanel’s Backup Wizard. Test changes on a staging site when possible. A single mistyped SQL query can delete months of content or break every page on your site. The five minutes spent creating a backup can save hours of recovery work. How to Access phpMyAdmin in cPanel Log into your cPanel account. Scroll to the Databases section. Click the phpMyAdmin icon. phpMyAdmin opens in a new browser tab. You’re automatically logged in with your cPanel credentials, so you’ll only see databases that belong to your account. Understanding the phpMyAdmin Interface The interface has two main areas: Navigation panel (left side): Lists all your databases. Click a database name to expand it and see its tables. Click a table name to view its contents. Main panel (right side): Displays information about whatever you’ve selected, along with action tabs across the top. When you first open phpMyAdmin without selecting a database, the main panel shows server information: the MySQL version, character set, and phpMyAdmin version. This information can be useful when troubleshooting compatibility issues or contacting support. Selecting and Viewing a Database Click any database name in the left panel to select it. The main panel updates to show: A list of all tables in that database Row counts for each table The size of each table on disk The storage engine (usually InnoDB) This overview helps identify which tables are consuming the most space. In WordPress sites, the wp_posts and wp_postmeta tables typically grow the largest, followed by any tables created by plugins. Click any table name to view its contents. phpMyAdmin displays the first 25 rows by default. You can change this limit or navigate through pages of results using the controls at the bottom. The Database Menu Tabs When you select a database, a row of tabs appears across the top of the main panel. Each tab serves a specific purpose. Structure Shows all tables in your database along with their row counts, sizes, and storage engines. You can: Create new tables View or modify individual table structures Drop (delete) tables Check, analyze, or repair tables in bulk Select multiple tables using the checkboxes, then use the “With selected” dropdown to perform batch operations. SQL Opens a text area where you can type and execute raw SQL queries. The syntax highlighting helps catch errors before you run them. Common uses: Search-and-replace operations across multiple tables Bulk updates that would take too long through the interface Running queries provided by plugin support teams Deleting spam comments or revisions in bulk phpMyAdmin displays the results below the query box. For SELECT queries, you’ll see a table of matching rows. For UPDATE or DELETE queries, you’ll see how many rows were affected. Search Lets you find specific values across one or multiple tables without writing SQL. Enter your search term, select which tables and columns to search, and phpMyAdmin shows you every match. This is useful for locating where a particular setting, URL, or piece of content is stored in your database. Query Provides a visual query builder for users who prefer not to write SQL by hand. Select tables, choose columns, and set conditions using dropdown menus. phpMyAdmin generates the SQL for you. The Query tab is helpful for learning SQL syntax. Build your query visually, then examine the generated code to understand how it works. Export Creates a downloadable backup file of your database. You’ll use this before making major changes, when migrating to a new host, or as part of a regular backup routine. Quick export downloads the entire database in SQL format with default settings. This works for most backup and migration scenarios. Custom export lets you choose specific tables, change the output format (SQL, CSV, JSON, XML), and adjust options like adding DROP TABLE statements or compressing the output. Import Uploads a database file to restore from a backup or complete a migration. Supported formats include SQL, CSV, and compressed archives (.gz, .zip). The Import tab shows your server’s maximum upload size. If your database file exceeds this limit, you’ll need to use an alternative method. More on this in the Import File Size Limits section. Operations Contains maintenance and administrative tasks: Rename database: Change the database name (creates a copy with the new name, then drops the original) Copy database: Duplicate the entire database Collation: Change the character encoding Table maintenance: Optimize, repair, check, or analyze tables The Operations tab is also where you’ll find options to truncate (empty) the database or drop (delete) it entirely. Common phpMyAdmin Tasks Most users open phpMyAdmin for one of these reasons: Backing Up Before a WordPress Update Before updating WordPress core, themes, or plugins, export your database so you can restore it if something breaks. Select your WordPress database in the left panel. Click the Export tab. Leave the format as SQL and click Export. Save the downloaded .sql file somewhere safe. If the update causes problems, you can restore this backup using the Import tab. Restoring a Database After Migration After moving to a new host, you’ll import your database backup: Create an empty database and user in cPanel’s MySQL Databases tool. Open phpMyAdmin and select the new database. Click the Import tab. Click Choose File and select your .sql backup. Click Import. The import process may take several minutes for large databases. Don’t close the browser tab until it completes. Resetting a WordPress Admin Password Locked out of your WordPress site? You can reset your password directly in the database. Select your WordPress database. Click the wp_users table (or whatever prefix your installation uses). Find your user account and click Edit. In the user_pass field, select MD5 from the function dropdown. Enter your new password in the value field. Click Go to save. WordPress will recognize the MD5-hashed password and let you log in. For detailed steps, see How to Reset a WordPress Password in phpMyAdmin. Finding Large Tables If your database has grown unexpectedly, the Structure tab shows which tables are using the most space. Select your database. Click the Structure tab. Click the Size column header to sort by size. Common culprits in WordPress: wp_posts: Stores post revisions (WordPress keeps unlimited revisions by default) wp_postmeta: Can bloat from plugins storing temporary data wp_options: May contain transients that weren’t cleaned up Plugin-specific tables for logging, analytics, or form submissions Optimizing and Repairing Tables Database tables can become fragmented over time, especially after many insert and delete operations. Corrupted tables can cause missing data or error messages. Optimizing Tables Optimization reclaims unused space and defragments the data file. Select your database. Click the Structure tab. Check the boxes next to the tables you want to optimize (or click “Check all”). From the “With selected” dropdown, choose Optimize table. Click Go. phpMyAdmin reports the result for each table. A status of “OK” means the optimization completed successfully. A note saying “Table does not support optimize” appears for InnoDB tables, which handle optimization automatically. Repairing Tables If you’re seeing errors about corrupted tables, try the repair function. Select your database. Click the Structure tab. Check the boxes next to the affected tables. From the “With selected” dropdown, choose Repair table. Click Go. phpMyAdmin attempts to fix any corruption. This works well for minor issues, particularly with MyISAM tables. Severe corruption may require restoring from a backup. You can also use cPanel’s built-in repair function: go to MySQL Databases, scroll to Modify Databases, select your database from the Repair dropdown, and click Repair Database. Running SQL Queries The SQL tab accepts any valid MySQL query. Here are some examples for common tasks. Delete All Post Revisions in WordPress DELETE FROM wp_posts WHERE post_type = 'revision';DELETE FROM wp_posts WHERE post_type = 'revision'; Delete All Spam Comments DELETE FROM wp_comments WHERE comment_approved = 'spam';DELETE FROM wp_comments WHERE comment_approved = 'spam'; Find All Rows Containing a Specific URL SELECT * FROM wp_posts WHERE post_content LIKE '%oldsite.com%';SELECT * FROM wp_posts WHERE post_content LIKE '%oldsite.com%'; Update URLs After Domain Change After migrating to a new domain, old URLs remain in your database. This query updates them in the posts table: UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://oldsite.com', 'https://newsite.com');UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://oldsite.com', 'https://newsite.com'); You’ll need to run similar queries for other tables like wp_options, wp_postmeta, and any plugin tables that store URLs. Important: Simple find-and-replace queries can corrupt serialized data stored by WordPress plugins. For domain migrations, consider using a dedicated tool like the Better Search Replace plugin or WP-CLI’s search-replace command, which handle serialized data correctly. Import File Size Limits phpMyAdmin imports are limited by your server’s PHP configuration. On most shared hosting accounts, the maximum upload size ranges from 50MB to 256MB. Check your limit by clicking the Import tab. The maximum file size appears directly below the file selection button. If your database file exceeds this limit: Compress the file: phpMyAdmin accepts .sql.gz and .sql.zip files. Compression often reduces file size by 80-90%. Use cPanel’s Backup Restore: The cPanel backup tool handles larger files than phpMyAdmin’s browser-based uploader. Import via SSH: For databases over 500MB, importing through the command line is faster and avoids timeout issues: mysql -u username -p database_name < backup.sqlmysql -u username -p database_name < backup.sql For detailed instructions, see Importing a Database via SSH. Search and Replace phpMyAdmin’s Find and Replace feature lets you update values across an entire table without writing SQL. Select a table in the left panel. Click the Search tab. Click the Find and replace tab. Enter the text to find and the replacement text. Select which column to search. Click Go to preview matches. Click Replace to make the changes. This approach works well for simple text replacements within a single table. For site-wide URL changes across multiple tables, a dedicated search-replace plugin handles serialized data more safely. Giving Developers phpMyAdmin Access If a developer needs database access, don’t share your cPanel credentials. Instead, install a separate phpMyAdmin instance that connects only to their assigned database. Create a new database and database user for the developer in cPanel’s MySQL Databases. Assign only the necessary privileges. Install phpMyAdmin in a subdirectory of your account. Configure it to connect with the developer’s credentials. This approach limits their access to a single database and keeps your cPanel login secure. For step-by-step instructions, see Installing phpMyAdmin on your Account. Alternatively, if the developer only needs to run specific queries or view data, you can export the relevant tables and send them the SQL file. Troubleshooting Common Issues “Table doesn’t exist” Errors This usually means the table was dropped or the database prefix is wrong. Check that you’re connected to the correct database and that the table name matches what your application expects (including the prefix, like wp_ for WordPress). Queries Timing Out Large queries can exceed PHP’s execution time limit. Options include: Breaking the query into smaller batches Running the query via SSH instead of phpMyAdmin Asking your host to temporarily increase the timeout Import Fails with “Script timeout” Large imports may exceed the maximum execution time. Try: Compressing the SQL file before uploading Using cPanel’s command-line import instead Splitting the SQL file into smaller chunks Changes Don’t Appear on the Website WordPress and many CMS platforms use caching. After making database changes: Clear any caching plugin (WP Super Cache, W3 Total Cache, etc.) Clear your browser cache If using a CDN, purge the CDN cache Next Steps Now that you understand phpMyAdmin’s interface and capabilities, you can: Export a database backup Import a database from another server Create databases and users in cPanel Set up remote database access Regular database maintenance keeps your site running smoothly. Export a backup before major changes, optimize tables periodically, and address corruption warnings promptly before they cause data loss. Share this Article Carrie Smaha Senior Manager Marketing Operations Carrie Smaha is a Senior Marketing Operations leader with over 20 years of experience in digital strategy, web development, and IT project management. She specializes in go-to-market programs and SaaS solutions for WordPress and VPS Hosting, working closely with technical teams and customers to deliver high-performance, scalable platforms. At InMotion Hosting, she drives product marketing initiatives that blend strategic insight with technical depth. More Articles by Carrie Related Articles How to Create an Admin Account in WordPress via MySQL Setting up a Remote MySQL Database Connection How to Check and Repair a Database in phpMyAdmin MySQL Error 1064: You Have an Error in Your SQL Syntax MySQL Error 1044 Access Denied Check and Repair MySQL Databases How To Manage Databases in cPanel with phpMyAdmin Database Optimization: Tips Using MySQL Tuner Create a blank database How to Create a MySQL Database Using CLI & cPanel