The best way to keep the site data safe is to use the hosting service provider’s daily backup service, back up the website data manually, or use a plugin that will let you create full site backups without putting a load on your server. What if you don’t back up your website? If someone gets access to your WP admin and deletes all posts or inserts 1000s of links in the posts, you will be in big trouble.
Backups not only come in handy when the site is hacked. If you install/update a plugin or a theme or update the WordPress CMS and something goes wrong with the website, you can quickly restore the database if you have got its backup. Below, we’ve covered various methods of backing up a WP site:
UpdraftPlus is the best plugin to back up WordPress website data and files. When it is active, you can back up the WP database or files or both and download the generated file to your computer. The plugin is easy to use. Click on the large button displayed on the page and choose either or both of these two options – include your database in the backup and include your files in the backup, and wait for a few seconds.
The files are generated quickly, and while the plugin is generating them, you can see the progress. Old files can waste the storage memory of a server. You can delete these files with a click of a button. UpdraftPlus enables its users to send the backup to Google Drive, Amazon S3, Dropbox, etc. It also lets you schedule backups. These were the features of the UpdraftPlus plugin’s free edition. The Premium version of UpdraftPlus supports cloning, migration, anonymize function, incremental backups, WP-CLI, and many more features. Its subscription fee starts at $70.
There are many plugins in the WP repository. UpdraftPlus is the best among the lot. This is the reason why I’ve shared just a single plugin.
If you’re allowed to log in to your server via SSH, you can back up the data manually by running the following Linux commands:
mysqldump database_name > bkp_file.sql
tar -cvzf directory_bkp.tar.gz full_path_to_the_wordpress_directory
The first command will create a SQL file containing the queries that will recreate the entire database. The second command will generate a highly compressed archive containing the WordPress directory. You can use the 2nd command to backup important configuration files on the server.
When the file has been generated, you can either download it to your computer with the SFTP tool or use the free rclone application to send the file to cloud storage services such as Box, Google Drive, OneDrive, etc. It takes some time to set up rclone but when the application is set up, you just have to run a single command to backup/sync any file on the server to the cloud storage service.
Using the hosting company’s service: Shared hosting companies either bundle the backup service with their costlier plans or offer an add-on service. For example, Hostgator lets users subscribe to the CodeGuard service for $2 per month. Bluehost enables daily backup for the subscribers of its Choice Plus and Pro plans. Hostinger also activates daily backups for the subscribers of its Business Shared Hosting plan.
Closing words: Website owners or administrators can keep the site safe by creating its DB and file backups often. The simplest and quickest way to do so is to use a good plugin. The manual method is a bit hard, but it gives you more control. For example, you can choose the files of DB tables that you want to back up. The last method i.e. using the company’s add-on or service will cost you money. If you don’t want to install a plugin or run Linux commands, you can use/purchase this service/add-on.