This article is for cases when you do not have files backup, and only database backup is available. If you have both website files and database backup, it's highly recommended to restore the website regular way.

This method of recovery is only partial, and you might not be able to recover everything, however, WordPress stores most settings and data in its database. Thus, you will be able to recover most of your WordPress website only from your database.


Step 1 - Import the database

First, open your Hosting Manage MySQL Databases page:

And create the database. Then, open it in phpMyAdmin, and import the database backup file.

NOTE:

  • You need a .sql file for importing. If your database backup is in an archive, make sure to unpack it first

Step 2 - Restore WordPress installation

Since you only have a MySQL database at the moment, the next step should be installing a fresh WordPress. For that, download the WordPress installation files from the official website, and upload them with any suitable option (Import Website, File Manager, FTP).

Access your WordPress admin area (open domain.tld/wp-admin, where domain.tld is your domain), choose the language for your website, and click Let's go!

In the next step, you are required to provide database information. Insert data of the database, which you created in the previous step.

If everything was done correctly, you will then receive a message, that WordPress is already installed:

You need to log in, using your old credentials.

NOTE:

  • If you haven't received this notification, you might need to redo the whole process. Make sure to double-check the credentials and table prefix which you inserted

Step 3 - Reinstall theme and plugins

At this point, your website should have your old posts and pages, settings, custom CSS files, and users. For it all to appear properly, you need to reinstall your theme and plugins.

For theme, it would be enough to simply install your previous theme.

Then, open the Plugins menu and install the missing plugins. If you don't remember the full list of plugins, don't worry - the database has records of all of them, so you will see a warning about each plugin that is missing:

Step 4 - Fix links and images

In the next step, you need to recreate permalinks. After this, the majority of links on your website should work properly.

As databases don't contain images, to fix the issue with missing images, you will need to re-upload each and every image. To ease this process, we will use 2 tools:

Broken Link Checker plugin

Install and activate a Broken Link Checker plugin. Then, open its settings (will most likely be at Tools → Broken Links, but may differ based on your WordPress and plugin versions). There you will see a full list of broken links - it will help you determine which images are missing and their previous location. All you need to do is re-upload these images:

Internet Archive

In case you don't have all or some of the images, you can get them from the Internet Archive, if your website was indexed. For that, simply insert your website address into the WayBackMachine section:

If there are any snapshots available for your website, you will see these blue circles around certain dates of the year. Click on those dates in order to access a previous version of your website.

After that, search for the specific images that are missing, download them from the archived version, and upload them back to your website.

That's it, now your website should be restored 🎉

Did this answer your question?