InMotion Hosting Support Center

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.

Was this article helpful?
Continued Education in Course WP-CLI Basic Commands
You are viewing Section 1: Check and Repair Database with WP-CLI
Section 2: Find Your Last Used Theme WIth WP-CLI

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Forum Login

You are NOT logged in. You can still browse our Support Center.

To participate within our Community Support Forum:

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

0 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!