Connecting to your Database with WP-CLI

Last Updated -

SSH into your server and move into the site directory you need to manage. See also wp-cli database commands

 $ cd /sites/domain-name/

Enter the following command:

$ wp db query

You should now see the following command prompt that indicates you have successfully connected to your database.

$ mysql>

Tip: To view the subcommands for wp db enter the following command.

 wp db --help

Related Topics

Pagely is the Managed WordPress Hosting Platform designed to exceed the needs of media, business, and Enterprise customers alike. We help the world's biggest brands scale WordPress.

Copyright © 2006-2017 Pagely, Inc. All rights reserved.
Pagely® and WordPress® are registered trademarks.

Powered by Zendesk