How to Restore WordPress Via Database Backup

How to restore WordPress can be done by several methods, one of which is through a database backup that you have. Making backups of website files and databases is always an interesting idea. The more often you make backups, the less likely you are to lose data, especially when something bad happens to your website.

If you have backups, it will be easier for you to restore data when a website is infected with malware, or when you accidentally delete an existing file. In this tutorial we will review how to restore WordPress via a MySQL database backup.

For your information, this method can only recover some data and may not be able to recover all your website files. However, WordPress stores a lot of settings and data in the database. Therefore, you have the opportunity to restore WordPress from database backups only.

What do you need?

Before starting the steps in this tutorial, make sure that you have:

  • Access to your hosting control panel
  • MySQL database backup

Here is how to restore WordPress…

Step 1: Import WordPress Database Backup

First of all you need to create a new MySQL database, for the purpose of Import

database backups.

1. Please login to cPanel from your hosting account and select menu MySQL Databases

how to restore wordpress

2. Please create a database in cPanel, you can follow the tutorial the following.

3. After that, please access the database that you have created via the phpMyAdmin menu in your cPanel.

how to restore wordpress from database

style="font-weight: 400;">4. After logging into phpMyAdmin, please select database name that you created earlier. Then, import your WordPress database backup. To do so please select the tab Imports:
style="font-weight: 400;"> (1) select .SQL file, (2) set Format to .SQL, (3) click button
Go. For a more detailed way please see the tutorial the following.

[ecko_alert color=”gray”]IMPORTANT: Take note of your MySQL database details (Database Name, Username and Password) which will be required in the next step. Also note the Table Prefix visible to the left of phpMyAdmin (in this example it is niagahos_).[/ecko_alert]

restore wordpress

Step 2: Restore WordPress

style="font-weight: 400;">Because in this case all you have is a MySQL database backup, the next step is to install WordPress. WordPress installation can be done in two ways:

1. Through the auto installer facility on cPanel, namely Softaculous.

2. Manually install WordPress. You can follow the tutorial the following to start installing.

[ecko_alert color=”gray”]IMPORTANT – When filling out the details of the database, please fill it in according to the details of the database that you created on step 1, yaitu Database Name, Username, Password and Table Prefix.[/ecko_alert]

restore wordpress2

3. If the database details you entered are correct, you will see a message that the WordPress installation process has been successful.

already installed

[ecko_alert color=”gray”]IMPORTANT – If you don’t get notification, please check again from step one.[/ecko_alert]

id="Langkah_3_Instal_Kembali_Template_dan_Plugin">Step 3: Reinstall Templates and Plugins

In this step, your website already has posts, pages, settings, and custom CSS and user files. However, without the previous templates and plugins installed on your current WordPress site, things won’t look the same as before. Please follow the steps below.

1. Please reinstall the WordPress template that was used on the previous website.

2. Please reinstall the plugin that was used on your previous WordPress site. To find out what the plugins are, you can access the WordPress dashboard you and choose the menu Pluginsand the plugin name will look like the image below.

wordpress plugin missing

Step 4: Fix Permalinks

At this step, your site is partially recovered, but you should still see the problem. Usually about permalinks not working and displaying messages Error 404 Page Not Found.

To improve Permalinks, please select menu Settings on your WordPress dashboard and select Permalinks. Click button Save Changes. At this step the permalinks problem should have been resolved.

fix permalinks

Step 5: Fix Missing Images

This is the part that is quite difficult considering that your website images were not previously stored in the database. To fix it, you need to re-upload the missing images one by one.

1. To find more specific images, please install the plugin Broken Link Checker. You can do the installation by selecting the menu Plugins > Add New and write the name of the plugin in the search field. After that, click button Install Now. Activate the plugin when the installation process is complete.

install plugin

2. Please access the plugin via the menu Tools > Broken Links. You will see a list of broken links, so you can determine which images are missing and where they are stored.

broken link

3. After that you can re-upload the image you want according to the previous place.

In some situations, you may not have an image to re-upload. The solution, you can check your website with Archive.org. How to restore WordPress using this tool is quite useful for finding your lost images.

1. Please access Archive.org. At the top of the page you will see the words Waybackmachine. Please enter your website address in the column provided.

restore with waybackmachine

2. If any snapshots of your website appear, please click on the section marked in blue to access your website on that date.

previous date

3. After that please select the image you want to use to re-upload to your WordPress site.

Conclusion

By now you already know how to restore WordPress from a database backup only. You can also solve other problems that arise, such as broken links or missing images and other ways to recover images. Make sure that you always back up your website to avoid data loss problems or being accidentally deleted from your server.

Do you still have questions? Please share in the comments section at the end of this page! Don’t forget to also click subscribe to continue to get the latest reviews about the online world directly from your email?

Create by Ipadguides in category of Blog