Backing Up Your WordPress Database

Backing Up Your WordPress Database

Profile picture for user sarojini
Sarojini Devi Nagappan
20 October 2020

WordPress is a popular open source content management system (CMS) and a pretty common website development tool for many bloggers, small businesses, and Fortune 500 companies. They have many standout professional themes suitable to build websites for any industry in a short period of time. With WordPress, you don’t need to be an expert designer, instead use their huge collections of photos, images, and maps to make an impressive looking website in no time at an affordable price plan. The building blocks, like any other popular CMS tools, allow you to drag and drop widgets and components at any position and delete them without scripting, making this platform easy enough to handle for any non-technical user.

Following are some of the merit points for WordPress, making it a popular choice as a website builder tool:

  • Content creation made easy with a friendly editor.
  • Easily customizable with tons of available themes and plugins for a feature-rich website.
  • Website for almost anything including personal blogs right up to eCommerce portals.
  • You can own a 100% self hosted free website and have full control over maintaining your website.
  • There are many online self-learning resources available to create WordPress sites anytime.

A WordPress site could be holding many crucial data like blog posts, links, or digital product contents, and having a backup of the WordPress database is very important for recovery in case of any disaster strikes to avoid downtime for the site. This blog looks at WordPress database support, backup, and recovery management. The final section shows you how to schedule automated backups using Backup Ninja, a backup service for automated backups locally and on the cloud.

WordPress Database Management

WordPress uses PHP to store and retrieve data from a MySQL database installed on your hosting server. It stores different types of contents like posts, pages, custom post types, attachments and links widgets, users, and many others. You can use phpMyAdmin, a web-based management tool to manage the WordPress MySQL database. This tool has a user-friendly interface allowing you to run queries and manage any database operations like editing database tables, rows, and fields, import, export, or delete all data inside a database. Most hosting providers having WordPress offer phpMyAdmin under the database section as a database management tool.

WordPress Database Backup

Taking WordPress database backups at regular intervals is important for restoring the database should any failure occur. The core WordPress database only contains the posts, pages, and comments and does not include backup of the files and folders such as images or theme files on the server. To have all this, you need to backup the full WordPress site. You can use an option in the cPanel, phpMyAdmin, MySQL commands, MySQL workbench, or using a WordPress plugin.

Backup WordPress Database Using cPanel

cPanel is a control panel used by many web hosting which gives the option to backup your WordPress MySQL database. Navigate to ‘Download a MySQL Database Backup’ select the database you want to backup to start the backup process. A  *.gzip compressed file will be downloaded to your local drive which can be used later for restoration when required. There is no need to uncompress the file, simply upload the same compressed file using cPanel. Once the upload is complete, it will be indicated at the bottom of the cPanel.

Backup WordPress Database Using phpMyAdmin

You can also use phpMyAdmin to take a backup using a web interface quickly. Options to backup using phpMyAdmin might differ based on the version. In this blog, the steps and screenshots are taken from, which uses phpmyAdmin version 4.4.13. To create a backup click on the Export tab.

Backup WordPress Database Using phpMyAdmin

The quick method will export your database in a .sql file, and the custom option will provide you with more options and ability to download backup in compressed zip or gzip archive.

Backup WordPress Database Using phpMyAdmin

The custom option allows you to exclude the tables you don’t want to backup. If you want to restore the backup, you can import it using phpMyAdmin’s import tab to the same or different database.

Backup WordPress Database Using a Plugin

Besides the two methods above, another point and click method to take WordPress database backup is using the WordPress database backup plugin, which can be found in the WordPress Plugin Directory.  Firstly, install and activate the WP-DB-Backup plugin. Then navigate to the Administration > Tools > Backup. By default, all core tables are included in the backup.

Backup WordPress Database Using Plugin

Choose if you want to download the backup to your own computer or email the backup to your preferred email address.

Backup WordPress Database Using Plugin

Lastly, click on the Backup Now button to start the backup. You can also configure to schedule backup by selecting the frequency option.

Backup WordPress Database Using Backup Ninja

WordPress database backups methods always store the backups on the database server or local drive. Although having backups locally is good for faster restoration, it is vulnerable to security threats and requires a continuous investment in storage infrastructure to store the backups. As part of a disaster recovery strategy, it is good to have backups on the cloud in your storage strategy. Cloud backups are essential because it allows you to have your backups stored safely in a different location. Therefore, it is safe from different types of data loss, including those caused by natural disasters, human error, or ransomware. If you want to have backups on the cloud for your WordPress database, you need to manage two different platforms, one to create backups locally and another to manage the backups on the cloud. Alternatively, you can use external backup services like Backup Ninja to have WordPress database backups stored locally and in the cloud in an automated way.

Backup Ninja is a secure and reliable backup service which allows you to take scheduled backups for open source databases like MySQL, PostgreSQL, MariaDB, Timescale, Percona, and MongoDB backup without any scripts. You don’t need to worry about having highly skilled administrators to monitor your backups, instead just install the Backup Ninja agent on your WordPress database server and have partial, incremental, and full backups taken all using a web interface.

Scheduling WordPress Database Backup on Multiple Storage with Backup Ninja

Installing Backup Ninja agent will be your first step to schedule any automated backups on Backup Ninja. Once you have successfully installed the agent, your server will be listed as the host on the server. Upcoming steps will show you how to schedule backups for a MySQL database server both locally and on the cloud.

Step 1: Complete the schedule details.

Give a name for the backup schedule and select the server you want to backup. The backup method will list the backup tools installed in the server automatically. Backup type allows you to choose either a full or partial backup type.

Scheduling WordPress Database Backup on Multiple Storage with Backup Ninja

Step 2: Configure the backup storage.

Next select where you would like to store the backup. You can have a combination of local and cloud storage configured on the same screen. If you would like to add more storage locations, simply click on the Add New Storage button and fill in the next storage location. Retention here is the duration of how long you would want to keep the backup.

Scheduling WordPress Database Backup on Multiple Storage with Backup Ninja

Step 3: Backup name, compression, and encryption setting

Give a name to your backup, or you can choose to leave it at the default setting. If you are concerned about the backup size, enable the compression toggle and the backup will be compressed using the gzip compression. You can also enable the encryption to have encrypted backups.

Scheduling WordPress Database Backup on Multiple Storage with Backup Ninja

Step 4: Set the backup frequency.

The last step is to set the frequency of the backup task, and the backups will be scheduled to run according to the database server settings.

Scheduling WordPress Database Backup on Multiple Storage with Backup Ninja

View the created schedule on the scheduled listing. Click on the play button to start or pause the schedule. The storage shows you the two storage locations for the backup.

Scheduling WordPress Database Backup on Multiple Storage with Backup Ninja


All websites, whether it is a simple blog or a commercial site, holds a lot of information and losing curated content, is simply devastating. Every organisation needs to include backup management as an important component in their backup and recovery strategy, and this should include having automated backups to local and cloud centers. Whilst WordPress offers many different ways to backup its database; some options require some technical skills to manage them. Furthermore, the backup plugin and database management tool options offer limited options to customise your backup like having incremental or partial backups. Tools like Backup Ninja are a great option to solve this problem. It allows you to take "script-less" WordPress database backups and monitor them efficiently using a great interactive dashboard.