Database Studio

With MyKinsta’s Database Studio for WordPress, you can manage your site’s MySQL database right from the MyKinsta UI. Database Studio lets you run queries, view and edit data, add records and tables, and more, all without needing to use an external tool or download your database.

To access the Database Studio, go to WordPress sites > site name > Database Studio. When you first access the Database Studio, a warning appears to advise you to proceed with caution and use a staging environment to test your changes before making them live. To stop this message from appearing, select Don’t show me this warning again. To access the Database Studio, click Open Database Studio.

Access the Database studio.
Access the Database Studio.
WordPress Database Studio in MyKinsta.
WordPress Database Studio in MyKinsta.

Sort and filter your data

Within the Database Studio, you can sort the columns by using the arrows at the top of each column; you can also choose which columns you want to show using the Columns option. You can use Filters to show specific data, and you can apply more than one filter at a time. When a filter is applied, it shows an exclamation on the Filters option.

Apply filters to your database to show specific data.
Apply filters to your database to show specific data.

To open and edit the filter within the SQL console, click Open in SQL.

Database studio SQL editor.
Database Studio SQL editor.

You can create customized views of your database for easier access to the data you need. Click the plus icon, then select Create View. From there, you can give your view a name, choose the tables and columns to display, and apply any necessary conditions.

Create a new view for your database.
Create a new view for your database.

To open and edit the view within the SQL console, click Open in SQL console.

Export your database

Within the Database Studio, you can export your entire database or just selected data to a .json, .csv, or .xlsx file. To export your data, click the ellipsis (three-dots) and choose the file type you want to export to.

Export your database.
Export your database.

SQL console

Within the Database Studio, you can access an SQL console where you can run SQL queries on your database. The SQL editor lets you view the Database Schema, Prettify the code for better readability, and Run the SQL directly in the console. When you run the SQL query, you can choose to show the results as a table or as JSON, and export the results to a .json, .csv, or .xlsx file. You can also store these queries as snippets and create folders to organise the snippets.

Database studio SQL console.
Database studio SQL console.

Example SQL queries

The following are examples of SQL queries you may want to run in your WordPress database.

List all users

SELECT ID, user_login, user_email, user_registered FROM wp_users;

Get all published posts

SELECT ID, post_title, post_date FROM wp_posts WHERE post_type = 'post' AND post_status = 'publish';

Get all pages

SELECT ID, post_title FROM wp_posts WHERE post_type = 'page';

Get all approved comments

SELECT comment_ID, comment_author, comment_content FROM wp_comments WHERE comment_approved = 1;

Delete all spam comments

DELETE FROM wp_comments WHERE comment_approved = 'spam';

Edit a value

To edit a value within a record, double-click the cell containing the value you want to change. You can then delete the cell’s contents and enter the required value, or simply type over the existing data.

Edit a value in the Database Studio.
Edit a value in the Database Studio.

After making your changes, press Enter. The updated cell will be highlighted in yellow to indicate that a change has been made. To apply the changes to your database, click Save x change(s). If you decide not to keep the changes, click Discard changes instead.

Save changes to the values in your database.
Save changes to the values in your database.

Add a record

To add a record to your database, click Add record, enter the required data into the table and click Save x change(s).

Add a record to your database table.
Add a record to your database table.

Add a table

To add another table to your database, click the plus icon and then Create Table. You can then name the table and define its columns, specifying the data type, constraints, default values, and expressions for any generated data. Additionally, you can add table-level constraints and indexes as needed.

Add a new table to your database.
Add a new table to your database.

Once you’ve added the required columns, click Review and create, this will show you the SQL for the new table, if this looks correct, click Create table.

Settings

The following settings are available within the Database Studio:

  • Table rows count: Displays the total number of rows in each table. This action performs a light scan of the table, which may slow down performance, particularly for large tables or databases with many rows.
  • Expand subviews: If a table contains a foreign key to another table, you can open the related data in a subview. This option keeps subviews open, allowing you to easily explore related records without navigating away.
  • Pagination type: Choose how you want to view the results, Limit offset allows you to determine how many rows are shown per page, Pages shows the rows in batches of 50.
  • Editor font size: Changes the size of the font in the SQL console.
  • Editor keybindings: Choose which keybinding profile you want to use for your keyboard shortcuts from VS Code, Vim, or Emacs.

Report a bug

If you encounter an issue while using the Database Studio, click Report a bug, you can then click Download Error Context and contact our Support Team with this information.

Was this article helpful?

© 2013 - 2025 Kinsta Inc. All rights reserved. Kinsta®, MyKinsta®, and DevKinsta® are trademarks owned by Kinsta Inc.The WordPress® trademark is the intellectual property of the WordPress Foundation, and the Woo® and WooCommerce® trademarks are the intellectual property of WooCommerce, Inc. Uses of the WordPress®, Woo®, and WooCommerce® names in this website are for identification purposes only and do not imply an endorsement by WordPress Foundation or WooCommerce, Inc. Kinsta is not endorsed or owned by, or affiliated with, the WordPress Foundation or WooCommerce, Inc. Legal information