How to backup and restore WordPress WP tut How to backup and restore WordPress WP tut

How to Backup and Restore WordPress – WP Tut

In this WordPress tut, we are going to show you how to backup and restore your WordPress based website. There are a lot of different reasons why you need to know that, for example, while moving to another host, website crash, developing a new website design, etc. Let’s get started.

WordPress Files Backup

You have 2 options to backup WordPress files: the first one, you can do that via your hosting panel interface, the second one – via FTP. We recommend using the second one. Please follow these steps.

1. Please download the most popular FTP client FileZilla. It is compatible with both Windows and Mac OS X platforms.
2. Open the FileZilla client.
3. Enter the Host, Username, Password and Port that you’re usually using to logging in to your cPanel. Click on Quickconnect button.

4. Select all the files and folders, right-click on the mouse and click “Download”.

5. After downloading the WordPress files from your server, they will be saved on your computer within the selected folder.

WordPress Database Backup

1. Please log into your hosting cPanel.
2. Click phpMyAdmin in Databases section.

3. Choose the database name ‘your site database’ which you have created for WordPress, and click Export.

4. You will get two methods to export the database i.e. Quick and Custom. Select any of these methods and click on Go button. We recommend choosing the SQL file format.

5. The database file will be saved on your computer.

In case if you are moving your website to a new host or set up a new website, the first thing you have to do is to restore your existing WordPress files and then – WordPress Database.

WordPress Files Restore

1. Connect to your website using FTP.
2. Open the local directory in FTP and upload all WordPress files to your website.
3. Go to your WordPress folder and open 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_NAME’,’DB_PASSWORD’ and ‘DB_USER’ and with your new MySQL database details.

4. Save your wp-config file after editing and upload it to your WordPress site through FTP.

WordPress Database Restore

1. Please go to your hosting panel and open phpMyAdmin.
2. Create a new database and click on ‘Create button’.
3. Click on Import and choose ‘File’ button to select the backup SQL file from your computer.
4. Once the SQL file is uploaded successfully, it means that your imported database is ready.

In case if you’re moving to a new host you have to configure wp-config.php file with your new database details:

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’);

Hope this tut will be useful for you.