Database Backup

At Kinsta, we provide backups that are a complete snapshot of your WordPress site’s environment (including files, database, redirects, and Nginx configuration). There may be times you want to back up just your site’s database, and this guide will show you a few different ways to do that.

Download a Backup From MyKinsta

With this option, you’ll extract your site’s database from a backup you download from MyKinsta.

  1. If you haven’t already, log in to MyKinsta and select your site on the Sites page.
  2. Go to Backups > Download and click on the Create backup now button. This may take a bit of time to complete, depending on the size of your site. We’ll keep you updated with a notification in MyKinsta as well as an email to let you know when it’s ready.
    Downloadable backups in MyKinsta.
    Downloadable backups in MyKinsta.
  3. When your backup is ready to download, click on the “Download the backup now!” link in the email you received or the Download backup button in MyKinsta.
  4. When the download finishes, you’ll have a .zip file that contains your site files and database. Unzip that file and look for the sitename.sql database file.
    View the database (.sql) file in the downloadable backup of your WordPress site.
    View the database (.sql) file in the downloadable backup of your WordPress site.

    Note: You can create one downloadable backup per week. If you need more database backups during the same week, you’ll need to use one of the other database backup methods in this guide.

Create a Database Backup With phpMyAdmin

phpMyAdmin is a database management tool you can use to view, import, and export data in and out of your database.

  1. Log in to MyKinsta, go to WordPress Sites and select your site in the list.
  2. On the Info tab, scroll down to Database access. Click on the Open phpMyAdmin link, which will open phpMyAdmin in a new tab in your browser.
    Open phpMyAdmin from MyKinsta.
    Open phpMyAdmin from MyKinsta.
  3. Log in to phpMyAdmin with the Database username and Database password shown in MyKinsta, then click on the Export tab near the top of the page.
  4. Select the Quick export method, keep the format as SQL, and click the Go button to download your database backup (.SQL file).
    Exporting a database with the quick export method in phpMyAdmin.
    Exporting a database with the quick export method in phpMyAdmin.

Back Up a Database With WP-CLI and SFTP

If you have trouble with the phpMyAdmin interface or just want to use a different method, a slightly longer process is to use WP-CLI to export your database, then connect to the server with SFTP and download the database (.SQL) file.

  1. Connect to your server with SSH and navigate to the public directory:
    cd public
  2. Export your site’s database (replace db-backup-name with your preferred file name):
    wp db export db-backup-name.sql
  3. Connect to your site with SFTP and go to the public directory.
  4. Download your database (.sql) file.

Back Up a Database With External Backups Add-On

Our external backups add-on allows you to set up automatic external backups of your Kinsta site to Amazon S3 or Google Cloud Storage. With this add-on, you have the option to backup your files, your database, or both.

To create an external backup of just your database, select Database when setting up your external backup.

Selecting just the database for an external backup in MyKinsta.
Selecting just the database for an external backup in MyKinsta.

With these methods, you have several ways to get a backup of your website’s database when needed.