It’s every website operator’s nightmare:
Irrevocable data loss! Months or even years of work are wiped away with a single click. The scenario is not unrealistic. A server failure, an attack by a hacker or a virus attack can permanently damage or even completely destroy your data. We therefore strongly recommend that you carry out regular data backups. This article shows you how to do it.
Backup of the WordPress database
It is important to differentiate between the files on your server and the WordPress database. Let’s start with the database: This is where all the content of your website and all the settings of the WordPress installation are stored. Regular data backups are essential here in particular!
Various options for securing
There are various options available to you for backing up your WordPress database. On the one hand, WordPress offers special plugins that you can use to create automatic backups – if configured to do so. Be sure to check for available plug-in updates. You can only rely on regular backups if the version is kept up to date.
On the other hand, you can also perform the WordPress data backup manually. That’s what this article is about.
PhpMyAdmin for manual data backup
A so-called database dump is sufficient to perform a manual database backup for smaller websites with little content. This is done using the PhpMyAdmin export function. However, if your WordPress database is very large, this procedure is relatively error-prone. Abortions of the backup process in particular occur regularly.
Manual data export with PhpMyAdmin
First, log in to the admin area of your hoster. Go to the My-SQL databases here. Many hosters also provide a link to PhpMyAdmin here. First open this link and then your database with PhyMyAdmin. Navigate to the export function.
If your website contains several data or installations from other websites, you can select the desired table individually. Make sure that you click on all WordPress tables from which you want to back up the data and do not accidentally omit any.
Important note:
Monitor the data export carefully. It can happen with PhyMyAdmin that the data transfer is aborted or an error message is displayed. In this case, the backup has failed. Possible reasons for this are too much data or too short a script time to export all tables at once. If you make this observation, it is better to do without PhyMyAdmin and use the manual backup with MySQLDumper.
Database backups with MySQLDumper
MySQLDumper is a free software. This provides you with a secure and reliable method for WordPress database backup. Although there is no active further development of this program, according to widespread experience it also works without any problems under PHP 7. Users therefore continue to praise the MySQLDumper as an excellent way for secure database backups and fast restores.
How to download MySQLDumper
Below you can read how to download the MySQLDumper correctly:
- Download the MySQLDumper fork for PHP 7 from Github
- Unzip the files
- Create a subfolder for the unzipped files. It is best to provide this with .htaccess password protection. For security reasons, do not make the name of the directory too simple.
- Drag the unpacked data via FTP into the subfolder of your web space
- Call up the MySQLDumper directory on your server (e.g. B. https://pressengers.de/msdbckp). For this you need the access data of your WordPress installation
Once the database connection has been successfully established, the configuration can be completed and you will be redirected to the start page of the tool. From here you can access your backups (if already available) (under the menu item Restore) and the backup dialog. If you have several databases, you can change the database via a drop-down menu in the sidebar.
The actual manual backup with the MySQL dumper
You can access the backup wizard via the “Backup” menu item. Click on the “Start new backup” button and the data backup will be created. If you only want to back up parts of the database, simply check the “Select specific tables” box. You can now select individual WordPress tables or create a complete backup of your WordPress database using the “Select all” button.
Depending on the amount of data to be backed up, the backup takes between seconds and a few minutes. If a very large database is to be backed up, it can take considerably longer. Unlike PhpMyAdmin, however, the script runtime is irrelevant. As a rule, you can be sure that the backup will be created reliably. Malfunctions or system crashes are not to be expected.
The backup is stored on the server as a GZip file. This can be downloaded at any time.
The backup of WordPress files
To ensure that the entire database can be restored at any time, all data in your WordPress directory must also be backed up. These can be downloaded from the web server using an FTP program. We recommend FileZilla, a free program that is easy to use and frequently updated.
Simply enter the server’s access data and then connect to your web space. Then back up the complete WordPress directory on your hard disk. A tip if you are planning frequent, manual updates via FTP: A backup of the /wp-content/directory and the data wp-config.phg and .htaccess in the main folder is also sufficient here.
Then it’s done: your WordPress backup with database and file backups is ready. It is best to create complete backups at the beginning, preferably on a recurring date in the calendar.