All Collections
Files Management
Backups Management
How to Restore a WordPress Website with Only a Database Backup
How to Restore a WordPress Website with Only a Database Backup

How to restore your WordPress websites if the files are missing

Updated over a week ago

If you have both your website's files and database backups, follow this guide: restore your WordPress website.

Alternatively, if your WordPress website backup files are missing or corrupted, but you still have the database - you can still try to recover your website by following the steps below:

This method allows for a partial recovery due to the missing data from the website files. Some elements or features may be incomplete or unavailable.

Step 1 - Import the Database

Locate your database file on your device - it should have a .sql file format. If your database backup is in an archive format, such as .sql.gz, make sure to unpack it first.

Next, follow these steps:

Step 2 - Restore the WordPress Installation

Create a fresh WordPress installation on your hosting:

  1. Download the WordPress installation files from the official website

  2. Upload them with any suitable option (Import Website, File Manager, FTP)

Once the WordPress files are uploaded, access your WordPress Admin area - open this URL on your browser: domain.tld/wp-admin, replacing domain.tld with your domain name. Choose the language for your website, and click on Let's go!

You will be required to provide the database details. Insert the data from the database you created in the previous step:

The section to enter the database connection details for a new WordPress installation

Once the database connection is correctly established, you will get a message indicating that WordPress is already installed:

The Already Installed message from WordPress

Click on Log in and enter the old credentials you used for your original website.

If you don't get the "Already Installed" notification, start over from the first step, making sure to double-check the database credentials and table prefix.

Step 3 - Reinstall the Theme and Plugins

With this restoration, your posts and pages, settings, custom CSS files, and users will be recovered. Next, you will need to reinstall the theme and plugins for your website to display properly.

Then, open the Plugins menu and install the missing plugins. Since the database has records of all of the plugins you have previously installed, you will get a warning about each plugin that is missing:

The Plugins section on the WordPress Admin area showing the missing plugins

This will help you identify all the plugins that you will need to install.

Step 4 - Fix Links

To ensure the internal links on your website work correctly, recreate the permalinks.

Step 5 - Fix Images

Since databases don't store images, you will need to re-upload each image. To help you with this task, you can use the following tools:

Broken Link Checker plugin

Install and activate the Broken Link Checker plugin. Next, open the plugin's settings - there will be a list of broken links. This will help you determine which images are missing and their previous location. All you need to do is re-upload these images:

The Broken Link Checker settings showing some broken links found

Internet Archive

If some or all of your images are missing, you can try to retrieve them from the Internet Archive using the WayBackMachine section. Enter your website address on the search bar:

The WayBackMachine search bar

If there are any snapshots available for your website, they will be shown as blue circles around certain dates on the calendar. Click on your preferred date to access that version of your website:

The WayBackMachine search results showing snapshot availability by date

Once there, find the specific images, download them from the archived version, and upload them back to your website.

That's it! Your website has now been restored in the most comprehensive way possible using only the database.

Did this answer your question?