Keeping a healthy backup of your site is essential. Hence, web administrators must maintain proper backup of the website they own. Backups are usually done to ensure that if something goes wrong with the WordPress site or its data, it can be recovered adequately without loss and time delay. In this tutorial, you will learn about the most straightforward technique you can use to back up your WordPress site.
What Is a Backup?
A backup can be defined as a copy of the original site that will help you to restore your original site data and content when anything goes erroneous on your website. Staying on the safe side by backing up your data is advisable.
WordPress websites are created in different parts - the themes, plugins, and media, and the other is the database part that keeps all the posts, blog contents, and comments associated with the posts and pages. Without these types of files, it is impossible to have a proper website, so backing up all the files is essential. Backup is done explicitly in case any menace occurs on your site, like data loss, external attack, server down, hacking (DoS, DDoS), etc.
Backup Root Files of WordPress
There are a lot of files that are associated with your WordPress directory. Some of them can be downloaded back from the wordpress.org site. But, some of them cannot. There are such files:
- The wp-content directory contains themes, and plugins, including all your media files such as images, audio, or video files that have been uploaded to your site.
- The wp-config.php file has database configuration information as well as other required options that make it an important file.
Both the files mentioned above cannot be replaced by any other default file; hence, backup of such data is essential.
Backup WordPress Manually
WordPress is based on PHP and MySQL. In this case, you have to back up your files and associated database SQL file to have a complete copy of your site; The most direct way to copy your files is through FTP. For implementing this manual approach, the instructions are written below.
First of all, make sure you have saved all your files and folders in the directory where WordPress is installed or kept, i.e., within public_html if it is the main application folder of your account.
Now, the backup of the WordPress database can be taken like any other database. The WordPress wp-config.php file will contain the database connectivity details as well as other configuration parameters, like the WordPress security keys, debugging options, and much more. It is also possible to work without backup as the file is because you can forever retrieve the database connection particulars from another source. Still, it is easy and secure to back it up. In case you have numerous MySQL databases and you doubt which among the many is used by your site, in that case, you can open the "wp-config.php" file residing in the WordPress root folder and can see the name of the database saved next to the DB_NAME option.