Check and Repair Database with WP-CLI Updated on August 16, 2021 by InMotion Hosting Contributor 0 Minutes, 53 Seconds to Read When a WordPress website shows an Error establishing a database connection, those with access to cPanel can check and repair databases using MySQL Database or phpMyAdmin. Below, we cover how web developers can check and repair a WordPress database using WP-CLI. Note: You must navigate to the root folder of your WordPress installation in SSH or cPanel Terminal to continue. Check Database Type the wp db check WP-CLI command. You’ll see results listing each table, then OK or note : The storage engine for the table doesn’t support repair. cpuser01_bgri000.wpa0_terms OK cpuser01_bgri000.wpa0_usermeta OK cpuser01_bgri000.wpa0_users OK Success: Database checked. Repair Database Type the wp db repair WP-CLI command. You’ll see results listing each table, then OK or note : The storage engine for the table doesn’t support repair. cpuser01_bgri000.wpa0_terms OK cpuser01_bgri000.wpa0_usermeta OK cpuser01_bgri000.wpa0_users OK Success: Database repaired. If this doesn’t fix your issue, even after clearing your browser and server cache, please contact our Live Support for further assistance. Learn more about WP-CLI, the command-line interface for WordPress, and how to streamline your WordPress maintenance workflows! Share this Article InMotion Hosting Contributor Content Writer InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals! More Articles by InMotion Hosting Related Articles Install and Configure WP-CLI How to Create and Delete a WordPress Page Using WP-CLI Install a Theme Using WP-CLI Install WordPress Using WP-CLI Manage WordPress Comments Using WP-CLI Update WordPress Using WP-CLI Manage WordPress Users Using WP-CLI WP-CLI search-replace Command Delete WordPress Transients Using WP-CLI Manage WordPress Plugins with WP-CLI