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.
- If you haven’t already, log in to MyKinsta and select your site on the Sites page.
- 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.
- 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.
- 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.
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.
- Log in to MyKinsta, go to WordPress Sites and select your site in the list.
- On the Info tab, scroll down to Database access. Click Open phpMyAdmin, which will open phpMyAdmin in a new tab in your browser.
- 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.
- Select the Quick export method, keep the format as SQL, and click the Go button to download your database backup (.SQL file).
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.
- Connect to your server with SSH and navigate to the public directory:
cd public
- Export your site’s database (replace db-backup-name with your preferred file name):
wp db export db-backup-name.sql
- Connect to your site with SFTP and go to the public directory.
- 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.
With these methods, you have several ways to get a backup of your website’s database when needed.