This chapter explains about WordPress Backup. Backing up the WordPress site is very important as it prevents any data loss. Users should have regular backups in order to overcome the problems like server crash, and updating errors. Following concepts are covered in this chapter:
Importance of WordPress Backup
Backing up WordPress Files.
Backing up WordPress Database.
Importance of WordPress Backup
Description
Backing up the WordPress website is the most important thing for WordPress user. The user should maintain regular backup of the files and database.
Backing up the website allows the user to retrieve the current version if something goes wrong. Few things can break a website like server crash, an external assault, an error happening during an update or even by human error. Clients are not capable of controlling errors happening on the server side. In general, people working with servers might likewise make few mistakes.
These errors can be extreme where complete or a part of the site is altered. Clients might lose articles, images, videos and even can lose access to their own site. So, to avoid this from happening backing up the site should be done.
Backing up the WordPress Files
Description
Files are the heart of WordPress that contain some functions to be executed right away like publishing a post, commenting on an article or posting the tags etc. for instance.
Clients can recover the lost WordPress files by downloading a new archive from WordPress.org. For example, exceptions for those that are put into the wp-content subdirectory and the wp-config.php files at the beginning.
wp-content folder
The wp-content folder contains all the installed themes, plugins and the media files like audio and video. These folders are unique when compared to all other folders in WordPress.
wp-cofig.php file
The wp-config.php file contains some useful data about the database like User Name, Password, Authentication unique keys and some personalized options. The file cannot be replaced by default and the user should back up it.
Indeed, even different files can be recovered with an official archive, backing up them is not pointless by not downloading another installation. The user can pick up time and re-upload the entire site at the earliest.
Files Backup
Description
User should have a FTP/SFTP customer to get the web hosting and can download all the WordPress files into a folder on a PC. To back up installation for the first time, download the entire WordPress folder. If not, download the files created or can modify the files since the last time backed up.
In general, the user need to download some files like media, but should install a new plugin or modify the changes for the own theme. By default, WordPress sorts media files by month and year. In general, WordPress site contains the following files.
Plugins files
Themes files
Core installation files
Image files
PHP, JavaScript’s and some code files.
The image below shows some files listed in a wp-content folder for a WordPress site created locally.
Backing up WordPress Database.
Description
The WordPress data base is the most important part of the site, which contains the entire information like user names, passwords and other valuable information. Backing up the WordPress database can be done in a pretty easy way by using the tool known as phpMyAdmin.
Follow the steps below in order to back up the WordPress database.
Step 1
Open the phpMyAdmin page in any browser as shown in the below image:
Step 2
Now, select the database name created initially for using WordPress site from the list as shown in the image below:
Step 3
Now, a page showing the data for that particular website will appear. Click Export option on the top of the page as shown in the below image:
Step 4
Now, a page providing some options for exporting the backup data will appear. Select either Quick or Custom option and proceed by clicking the button Go as shown in the image below:
Now, the database file gets exported and downloaded locally.
Summary
Key Points
Back up of WordPress files and database can be done either manually or by using some tools and plugins.
Regular backups should be maintained by the user to prevent any data loss.
Note that backing up the files doesn’t mean the data is secured. The user can still lose the data on the server and the backup on the computer. That’s the reason, the user should always store the backups in various places like computer and an external hard drive.