Table of Contents
WordPress Tutorials: WordPress-Backup&Restore
In this lesson, we will study how to Backup & Restore files and databases in WordPress. In WordPress, there are two parts of backing up such as:
- WordPress Files Backup
- WordPress Database Backup
- WordPress Files Restore
- WordPress Database Restore
WordPress Files Backup
To get the backup files of WordPress, you need to install FileZilla Client on your system.
Following are the simple steps used for files backup operation in WordPress:
Step-1: Open the FileZilla Client.
![Wordpress Tutorials [All in 1] Best Series 2 Wordpress Tutorials [All in 1] Best Series 1](https://learncybers.com/wp-content/uploads/2019/10/9-1.jpg)
Step-2: Enter the Host, Username, Password, and Port-like you have used to log-in to your cPanel.
![Wordpress Tutorials [All in 1] Best Series 3 Wordpress Tutorials [All in 1] Best Series 2](https://learncybers.com/wp-content/uploads/2019/10/10-1.jpg)
After filling all the fields, click on the Quickconnect button.
Step-3: You will get all files and folders of your WordPress site on the right side.
![Wordpress Tutorials [All in 1] Best Series 4 Wordpress Tutorials [All in 1] Best Series 3](https://learncybers.com/wp-content/uploads/2019/10/11.jpg)
Step-4: Select all the files and folders and right-click on the mouse and click on Download.
![Wordpress Tutorials [All in 1] Best Series 5 Wordpress Tutorials [All in 1] Best Series 4](https://learncybers.com/wp-content/uploads/2019/10/12.jpg)
After downloading the WordPress files from cPanel, it will be saved on your system.
WordPress Tutorials: WordPress Database Backup
Following are the simple steps for database backup in WordPress:
Step-1: Type the path http://localhost/phpmyadmin in your browser. You will get the following screen.
![Wordpress Tutorials [All in 1] Best Series 6 Wordpress Tutorials [All in 1] Best Series 5](https://learncybers.com/wp-content/uploads/2019/10/13-1.jpg)
Step-2: Click on the database name ‘WordPress’ which you have created for WordPress.
![Wordpress Tutorials [All in 1] Best Series 7 Wordpress Tutorials [All in 1] Best Series 6](https://learncybers.com/wp-content/uploads/2019/10/14.jpg)
Step-3: After clicking on the database WordPress, it will open the following page. Click on the Export tab.
![Wordpress Tutorials [All in 1] Best Series 8 Wordpress Tutorials [All in 1] Best Series 7](https://learncybers.com/wp-content/uploads/2019/10/15.jpg)
Step-4: You will get two methods to export the database i.e. Quick and Custom. Select any one of the methods and click on the Go button.
![Wordpress Tutorials [All in 1] Best Series 9 Wordpress Tutorials [All in 1] Best Series 8](https://learncybers.com/wp-content/uploads/2019/10/16.jpg)
After exporting the database file, it will get saved on your system.
Restoring WordPress Files
Following are the simple steps used to restore the files in WordPress using FTP:
Step-1: Open the FileZilla Client and log in to your site using FTP.
![Wordpress Tutorials [All in 1] Best Series 10 Wordpress Tutorials [All in 1] Best Series 9](https://learncybers.com/wp-content/uploads/2019/10/17.jpg)
Step-2: Open the local directory in FTP and upload all WordPress files to your website.
![Wordpress Tutorials [All in 1] Best Series 11 Wordpress Tutorials [All in 1] Best Series 10](https://learncybers.com/wp-content/uploads/2019/10/18.jpg)
Step-3: Then, go to your WordPress folder → wp-config.php file. Copy and rename the wp-config.php file before editing, in case of some mistake you can restore this file back.
Open the wp-config.php file and locate the following code.
define('DB_NAME', 'db_name');
Replace the db_name with your database name which you have created.
define('DB_USER', 'db_user');
Replace the db_user with your username of MySql.
define('DB_PASSWORD', 'db_password');
Replace the db_password with your password of MySql.
Save your wp-config file after editing and upload it to your WordPress site through FTP.
Restoring WordPress Database
Following are the steps used to restore the database in WordPress −
Step-1: Type the path http://localhost/phpmyadmin in the browser.
![Wordpress Tutorials [All in 1] Best Series 12 Wordpress Tutorials [All in 1] Best Series 11](https://learncybers.com/wp-content/uploads/2019/10/19.jpg)
You can create a new database or import your backup in the existing database.
Here we’ll create a new database name, i.e., new_wordpress and click on Create button.
Step-2: You can view your created database as shown in the following screen. Click on the database name new_wordpress.
![Wordpress Tutorials [All in 1] Best Series 13 Wordpress Tutorials [All in 1] Best Series 12](https://learncybers.com/wp-content/uploads/2019/10/20.jpg)
Step-3: Click on import.
![Wordpress Tutorials [All in 1] Best Series 14 Wordpress Tutorials [All in 1] Best Series 13](https://learncybers.com/wp-content/uploads/2019/10/21.jpg)
Step-4: Click on the Choose File button to select the backup file from your system. After uploading the SQL file, select format as SQL.
![Wordpress Tutorials [All in 1] Best Series 15 Wordpress Tutorials [All in 1] Best Series 14](https://learncybers.com/wp-content/uploads/2019/10/22-1.jpg)
Click on the Go button.
Step-5: Once you click on Go, you will get a message after the SQL file is uploaded successfully.
![Wordpress Tutorials [All in 1] Best Series 16 Wordpress Tutorials [All in 1] Best Series 15](https://learncybers.com/wp-content/uploads/2019/10/23.jpg)