Introduction
Making a backup of your website’s files and databases are vital to your site. The more backups you make, the less you’ll suffer the consequences of unpredictable events such as a hacker attack or hard drive crash. Whether you have accidentally deleted some files by yourself or your WordPress has been compromised and your files corrupted by malware, it is still possible to restore your WordPress site. In this tutorial, you will learn how to make a WordPress backup. Even if you only have a backup of the MySQL database.
This recovery method is partial and you might not be able to recover everything, however, WordPress stores most of the settings and data in its database. Thus, you will be able to recover much of your WordPress site only from your database.
• What you will need
• Step 1 – Import the backup of the WordPress database
• Step 2 – WordPress Restore
• Step 3 – Reinstall your theme and plugins
• Step 4 – Correct the links
• Step 5 – Fix missing images
• Conclusion

What you will need
Before restoring your WordPress site, make sure you have the following:
• Access to your hosting control panel
• A backup of the MySQL database
Step 1 – Import the backup of the WordPress database
First, we need to create an empty MySQL database. We will import our backup of the MySQL database.
1. Go to the hosting control panel and find the MySQL database management section.

2. Create a database and assign a user to it. In this example, the Hostinger control panel provides the ability to create MySQL databases with users assigned to them quickly. Just fill in the required information. Consult this guide -in English- if you use cPanel to manage your account.

3. Access the newly created database via phpMyAdmin.


4. Import the database that you saved from your previous installation of WordPress. You can do this in the Import section: just select the .sql ( 1 ) database file, set the format to SQL ( 2 ) and press the Run button.
IMPORTANT: Make a note of the MySQL database information: database name, user and password, as you will need it in the next step. Also, note the table prefix. You can see the table prefix on the left side of phpMyAdmin. For example, wp_ is the base table prefix for WordPress, but it may be different if you changed it during installation.
Step 2 – WordPress Restore
Since you only have one MySQL database at the moment, the next step will be installing a new instance of WordPress:
1. Download the WordPress installation files from here.
2. Download the WordPress files to your hosting account. If you do not know how to proceed, check out our tutorial to learn how to install WordPress here
3. Access your WordPress installation (by accessing your website with your browser) and choose a language for installing WordPress. Once you have selected the language of your site, click on Go! Continue to the database configuration step. Use the information from the database you just created. We have recovered the table prefix a little higher, do not forget it is very important!
4. If done correctly, at the end of the installation, you will see a message telling you that WordPress is already installed.
IMPORTANT: If you have not received this notification, you will have to redo the entire process. Check the table prefix.
Step 3 – Reinstall your theme and plugins
At this point, your site should contain your old messages, pages, settings, custom CSS files, and users. However, without your previous themes and plugins, all this will not work as before:
• The first thing to do is to reinstall your theme. Just install the same theme that you used. Be sure to check out this guide to learn how to install themes easily on WordPress.
• Now reinstall the old plugins. Your database had a list of previously installed and activated plugins, so when you access the Extensions menu, you will see a list of plugins that are currently missing.
Step 4 – Correct the links
Now that you have restored most of your website, you may still have problems with it. Your links will probably not work as well and browsing your website will contain many errors 404 Page Not Found.
You can quickly fix permalinks by clicking Settings on your Dashboard and navigating to the Permalinks section. Click Save Changes at the bottom, without making any changes. This should update the permalinks and fix them.

Now comes the part a little more tedious. Unfortunately, the database does not contain the images from your previous website. There is no easy way to solve this problem. You will need to reload each missing image.
To help you find the missing images, we will use the Broken Link Checker plugin.
1. Just like with most WordPress plugins, you can install it via the official extension repository via your WordPress admin area. Just click on Plugins in your dashboard and select Add. Enter Broken Link Checker in the search bar and install the plugin. Make sure to Enable the newly installed plugin.
2. Access the newly installed plugin via the Dashboard by clicking Tools and accessing Broken Links. You will see a list of broken/missing links, which will help you determine which images are missing and their previous location. In our example, we only have a broken link and it is not an image, but the procedure is similar.
3. Now return the missing images to your site and, if necessary, update their links.
The worst situation that could happen to you would be that you no longer have these images. In this case, the best solution is to check an archived version of your website. Archive.org is an excellent tool for such cases. It could have a previous version of your website. You will then be able to download the missing pictures from here:
1. Navigate to Archive.org. At the top of the page, you will see the “Waybackmachine”. Enter the URL of your website and press the ENTER key.
2. If there are backups available from your website, you will see these blue circles around certain dates of the year. Click on these dates to access a previous version of your website.
3. Then, search for the missing specific images and download them from the archived version.
Conclusion
Now you know how to easily restore your WordPress installation from a backup. You also know how to detect other problems, such as broken links or missing images and a trick to recover them if you do not have these images anymore. Make sure to make backups of your website to avoid any problems if your website is lost or deleted. WordPress Department offers WordPress Support Services, WordPress Maintenance and anything your WP based site