You have a few options available for restore, if the WordPress dashboard currently isn’t available:
- Restore from a backup that your hosting company has taken
- Install a new version of WordPress and UpdraftPlus – then restore from the dashboard (by connecting your 3rd party storage location, it’ll bring back all the backups you’ve taken and from there you can restore)
- Manual restore
This article will focus on the 3rd option above, manual restore.
Here’s how to do it:
1. Unpack a fresh copy of WordPress
If you purchased the “more files” add-on with UpdraftPlus, skip to Step 2 below.
If you didn’t, then you first need to get a fresh copy of WordPress core from their website. So, if you are starting from nothing, then first download and unzip a WordPress zip from here.
You will also need to set up a new wp-config.php file, by editing and renaming the wp-config-sample.php file that is included in WordPress, so that it contains your proper database details. Don’t access WordPress itself in your browser until you’ve finished this entire procedure, though – edit wp-config.php in a text editor. You will also want to copy any other settings you had in your old wp-config.php – e.g. multisite settings. (If your backup includes a “wpcore” zip, then you can find your old wp-config.php in there. Don’t copy the old database settings, unless you really do intend to use the same database instead of importing the backup as below).
If your site is moving location (i.e. changing URL), then you will also want to add WP_HOME and WP_SITEURL parameters to the wp-config.php file. See here and here. (If you do not, then you will not be able to log in).
2. Unpack the plugins / uploads / etc
Unzip the backed-up zip files (i.e. the archives that UpdraftPlus created and stored) for your uploads, themes, plugins and other files back into the wp-content directory.
If your access to your website is via FTP, then that means you would do this for each of the .zip files you have from UpdraftPlus:
- Unzip the zip file on your computer
- Log in via FTP to your website’s hosting space, and move into the wp-content directory
- Copy the contents of the zip file via FTP into wp-content. If done correctly, then for the “plugins” backup, you will be copying over a folder called “plugins” into wp-content, so its final name is wp-content/plugins. (The “others” archive will not follow this pattern – it can have anything in it)
If you had the “more files” add-on, and have a “wpcore” zip, then unzip that one first. That is the zip that contains the “wp-content” directory that you’ll then be extracting the other zips into.
Note: For larger sites, your backup may be split over multiple zip files. For performance reasons, by default, UpdraftPlus splits the data every 400MB. So, you may have more than one “uploads” zip (with names ending in uploads.zip, uploads2.zip, uploads3.zip, etc.). You need to unzip and upload *all* of these, so that the final wp-content/uploads folder (in this example) is the resulting of merging all those zips (i.e. unzipping them all on top of each other).
3. Import your database
Finally re-install the database. Your web hosting provider will almost certainly provide you with access to a database manager – often phpMyAdmin.
If your database was not stored with encryption, then you can simply click on the ‘Import’ function in your database manager, and upload the database file (the file which ends in db.gz). Then you are finished.
Note: some versions of phpMyAdmin only want to accept a database backup for which the filename ends in the pattern “.sql.gz”. You can achieve this by simply renaming the UpdraftPlus backup – change the filename ending from “db.gz” to “db.sql.gz” before uploading it.
If your database needs decrypting (if the file name ends in gz.crypt) then you need to decrypt it before doing the above step.