Back up your files and your site’s database is always a good idea. The more backups you make, the greater the chance you will not suffer unforeseen events consequences. If you removed some files accidentally or your WordPress was compromised and their files have been corrupted by malware, it may still be possible to restore your WordPress site. In this tutorial, you will learn how to restore WordPress, even if you only have a backup of MySQL database.
This recovery method is only partial and you may not be able to recover all, however, WordPress stores more settings and information in your database. So you can recover most of your website from your WordPress just using the database.
Before beginning this guide, you need the following:
First of all, we need to create an empty MySQL database. We import our backup MySQL database for it.
IMPORTANT: Write down the details of the MySQL database: database name , user and password because you will need them in the next step. Also, note the table prefix . You can see the table prefix on the left side of the phpMyAdmin.
As when you only have one MySQL database, the next step should be to install a new instance of WordPress:
IMPORTANT: If you have not received this notification, you may need to redo the whole process. Check the setting again prefix .
At this time, your website must have old posts and pages, settings, custom CSS files and users. However, without their themes and plugins earlier, it does not appear as before:
Now that you’ve recovered most of your site, you can still have problems with it. Most likely, your permalinks will not work as they were and navigate your site will result in an error 404 page not found.
You can fix your permalinks by clicking Settings in your panel and accessing your section Links . Click Save Changes at the bottom, without actually making changes. This should update the permalinks and fix them.
Now comes the hard part. Unfortunately, your database does not contain images of its former site. There is no easy way to fix this problem. You will need to upload each image that is missing.
To help you figure out which images are specifically absent, we will use the plugin Broken Link Checkern .
The sad situation is when you no longer have these images. In this case, the best solution is to check an archived version of your site. Archive.org is a great tool for these cases and may have an earlier version, fully functional on your website. You can download the missing pictures there:
Now you know how easily restore most of your WordPress installation from a backup. You also know how to spot additional problems such as broken links or missing images and trick on how to get them if you do not already have these images. Be sure to start making backups of your website in order to avoid any problems if your site get lost or is removed .
Have you seen our custom hosting plan for WordPress? Choose the perfect package and start your new journey with WordPress Hostinger.
Keywords: WordPress hosting, site backup, website hosting.