HOWTO: Access your sandbox database

At WP Sandbox, we believe you should be able to do anything with your sandbox that you could with a stand-alone, self-hosted WordPress site.

We let you install whatever plugins and themes you like, and you can use SSH, WP-CLI, and SFTP to access the filesystem to edit the code as you see fit. 

And yes, of course, you can access the WordPress database for each of your sandboxes.

Here are a number of ways you can access the WordPress database of any of your sandboxes:

  1. Install a database management WordPress Plugin. Plugins we like for this include SQL Buddy, Adminer, phpMySQL, and Database Browser.
  2. Install the WPTerm WordPress plugin to get command-line access to the sandbox. From there you can access the file system, WP-CLI, or database at your whim.
  3. SSH into the sandbox from your local machine and use WP-CLI commands. You'll need your SSH credentials for that particular sandbox, so be sure to generate your SSH credentials first.
  4. Use a database management application on your personal computer. I use DBeaver on my Mac.

    Local apps, by default, want to connect to MySQL on port 3306, but a few (like DBeaver) give you the option to access the sandbox database via your sandbox SSH credentials over port 22 (the default SSH port).

    Local apps that don't offer SSH connectivity can still work, you just have to manually open an SSH tunnel on your machine to trick the program into connecting to the database. Here's how to open an SSH tunnel for MySQL access on Mac or PC.

We hope this helps you get the most value from your sandbox. Is there something we missed? Let us know!

Have a great rest of your day!

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.