WordPress Backup and Restoration

WordPress Backup and Restoration

In this chapter, we will learn how to back up and restore files and the database in WordPress. In WordPress, backups have two parts:

  • WordPress file backup
  • WordPress database backup
  • WordPress file recovery
  • WordPress database recovery

WordPress file backup

To obtain WordPress backup files, you need to install the FileZilla client on your system.

Here are the simple steps to back up your files in WordPress:

Step (1) – Open FileZilla client as shown below.

WordPress Backup and Restore

Step (2) – Enter the Hostname, Username, Password and Port that you use to log in to cPanel.

WordPress Backup and Restore

Step (3) – You will see all the files and folders of your WordPress site on the right, as shown in the image below.

WordPress Backup and Restore

Step (4) − Select all the files and folders, right-click your mouse, and click on Download .

WordPress Backup & Restore

Once the WordPress files are downloaded from cPanel, it will be saved on your system.

WordPress Database Backup

Following are the simple steps to perform WordPress database backup:

Step (1) − Type the path https://coder-cafe.com/phpmyadmin in your browser. You will get the following screen.

WordPress Backup and Recovery

Step (2) – Click on the database created for WordPress named “wordpress“.

WordPress Backup and Restore

Step (3) – After clicking on the database wordpress, the following page will open. Click on the Export tab.

WordPress Backup and Restore

Step (4) – You will be given two methods to export your database, namely Quick and Custom . Select any one of them and click on the Start button.

WordPress Backup and Restore

After exporting the database file, it will be saved on your system.

Restore WordPress Files

Here are the simple steps to restore WordPress files using ftp:

Step (1) − Open FileZilla client, log in to your site and use ftp as shown below.

WordPress Backup and Restore

Step (2) − Open the local directory in FTP and upload all WordPress files to your website as shown in the following screen.

WordPress Backup and Restore

Step (3) – Then, go to your wordpress folder → wp-config.php . Before making any changes, copy and rename the wp-config.php file so you can restore it if you make a mistake.

Open the wp-config.php file and find the following code.

define('DB_NAME', 'db_name');

Replace db_name with the name of the database you created.

define('DB_USER', 'db_user'); 

Replace db_user with your MySql username.

define('DB_PASSWORD', 'db_password'); 

Replace db_password with your MySql password.

Save the wp-config file after editing and upload it to your WordPress site via ftp.

Restore WordPress Database

Following are the steps to restore database in WordPress-

Step (1) – Type the path https://coder-cafe.com/phpmyadmin in your browser. The following screen will pop up.

WordPress Backup and Restore

You can create a new database or import the backup into an existing database.

Here we will create a new database name, i.e., new_wordpress and click on the Create button.

Step (2) – You can view the database you created on the following screen. Click on the database name new_wordpress .

WordPress Backup and Restore

Step (3) – Click Import .

WordPress Backup and Restore

Step (4) – Click the Choose File button to select the backup file from your system. After uploading the SQL file, select the format as SQL in the following screen.

WordPress Backup and Restore

Click the Go button.

Step (5) – After clicking Go, you will receive a message that the SQL file has been successfully uploaded.

WordPress Backup and Restore

Leave a Reply

Your email address will not be published. Required fields are marked *