WordPress – Backup & Restore
In this chapter, we’ll witness how to Backup & Restore files and database in WordPress. In WordPress there are two parts of backing up similar to −
- WordPress Files Backup
- WordPress Database Backup
- WordPress Files Restore
- WordPress Database Restore
WordPress Files Backup
To assemble the backup files of WordPress, you might want to set up FileZilla Client for your system.
Following are the easy steps dilapidated for files backup operation in WordPress −
Step (1) − Open the FileZilla Client as shown in the following screenshot.
Step (2) − Enter the Host, Username, Password and Port admire you dangle dilapidated to log-in to your cPanel.
After filling all of the fields, click on on Quickconnect button.
Step (3) − You too can gather all files and folders of your WordPress space on the relevant aspect as considered in the following conceal.
Step (4) − Have all of the files and folders and appropriate click on on the mouse and click on on Acquire.
After downloading the WordPress files from cPanel, this might per chance smartly be saved for your system.
WordPress Database Backup
Following are the easy steps for database backup in WordPress −
Step (1) − Form the course http://localhost/phpmyadmin for your browser. You too can gather the following conceal.
Step (2) − Click on on the database name ‘wordpress’ which you dangle created for WordPress.
Step (3) − After clicking on database wordpress, this can birth the following page. Click on on Export tab.
Step (4) − You too can gather two how to export the database i.e. Rapid and Custom. Have someone of the strategies and click on on Mosey button.
After exporting the database file, this can gather saved for your system.
Restoring WordPress Files
Following are the easy steps dilapidated to revive the files in WordPress the advise of ftp −
Step (1) − Open the FileZilla Client and login to your space the advise of ftp as shown in the following conceal.
Step (2) − Open the local itemizing in ftp and upload all WordPress files to your web web advise as shown in the following conceal.
Step (3) − Then, traipse to your wordpress folder → wp-config.php file. Copy and rename wp-config.php file forward of editing, in case of some mistake that probabilities are you’ll also restore this file relief.
Open the wp-config.php file and encounter the following code.
give an explanation for('DB_NAME', 'db_name');
Replace the db_name with your database name which you dangle created.
give an explanation for('DB_USER', 'db_user');
Replace the db_user with your username of MySql.
give an explanation for('DB_PASSWORD', 'db_password');
Replace the db_password with your password of MySql.
Put your wp-config file after editing and upload it to your WordPress space through ftp.
Restoring WordPress Database
Following are the steps dilapidated to revive the database in WordPress −
Step (1) − Form the course http://localhost/phpmyadmin in the browser. The following conceal will pop up.
You too can assemble a novel database or import your backup in the novel database.
Right here we’ll assemble a novel database name, i.e., new_wordpress and click on on Like button.
Step (2) − You too can watch your created database as shown in the following conceal. Click on on the database name new_wordpress.
Step (3) − Click on on Import.
Step (4) − Click on on Have interaction File button to make a preference the backup file from your system. After uploading the sql file, remove structure as SQL as shown in the following conceal.
Click on on Mosey button.
Step (5) − As soon as you click on on Mosey, that probabilities are you’ll gather a message after the sql file is uploaded efficiently.