Docs

VersionPress.com hosting docs

Database management

For database management, you can either use a WordPress plugin like ARI Adminer from within your site or one of the methods provided by VersionPress.com:

You can also use WP-CLI to import larger databases.

Adminer

Adminer can be accessed from the Database tab on the site detail screen:

image

Most of the values will be pre-filled for you, you just need to copy the password (which we tried to make pleasant; try clicking the password field!).

Database access via SSH tunnel

You can access your database from a local tool like MySQL Workbench, HeidiSQL or mysql client if you open an SSH tunnel. Some GUI tools will even automate this for you, see how to connect from PhpStorm as an example.

Universal method

This method works for all local tools as it makes the database appear to be running locally – after the tunnel is open, the tools just connect to 127.0.0.1:3306.

To open the tunnel, click the Connect remotely button in the portal and follow the instructions:

image

PhpStorm example

Some tools can work over SSH tunnels directly. Our example will be PhpStorm but other tools work similarly, see e.g. HeidiSQL.

In PhpStorm, first make sure you have Database Tools and SQL plugin enabled. Then in the Database panel, click '+' to create a new connection. On the SSH/SSL tab, enter the SSH connection details:

image

The General tab should look like this:

image

Note

The actual Host value will be something like 35.190.195.182, the screenshots are not updated yet. Note, however, that in PhpStorm, the value is not 127.0.0.1.

If you also check the database on the Schemas tab, you can connect and browse the database:

image

Importing databases

For smaller database dumps of up to about 50 MB, you can use Adminer to import it conveniently.

For larger databases:

  1. Upload the database dump.
  2. Connect via SSH.
  3. Run wp db reset and wp db import <file>.