Den här artikeln finns även på Svenska
From time to time you might need to restore your WordPres installation from backup, e.g. if the site has stopped working after an update, or if you edited some code on the site resulting in it no longer working. In this guide we’ll go through how you restore your site. Since a WordPress installation consists of both files and a database we will tell you how to restore both.
To get started with the restoration, log on to cPanel.
How to restore files
To restore files for your WordPress installation, you first must know what folder you need to restore.
If the installation uses the primary domain for the account
If the installation is reachable via the primary domain for the web hosting account (the one e.g. mentioned on invoices from us), you’ll find its files in the folder
public_html on the account. Therefore, you may restore that specific folder using our tool Acronis Backup according to these instructions.
If the installation uses an addon domain or a subdomain on the account
If you, on the other hand, have installed WordPress on an addon domain or a subdomain on your account, you need to doublecheck what folder the installation recides in. To check this, do the following:
- When you’re logged on to cPanel, click the icon
Subdomains, the principle is the same).
- Scroll down and you’ll see a table with all addon domains (or subdomains). In the column
Document root, you’ll find in which folder the installation recides.
You now know which folder you need to restore from backup. Follow the instructions here to restore the folder.
How to restore databases
Before you restore the database for your WordPress installation, you must know which database is being used by the site. You can find this out via the
wp-config.php file for the installation. First, find the document root for the site (where the config file usually is found) according to the instructions above and check the file’s content. You can use SSH, FTP or the file manager built in to cPanel to do this. Look for these lines:
/** The name of the database for WordPress */ define('DB_NAME', 'database_name');
In your wp-config.php file, the phrase “database_name” will be replaced by the name of the database your installation is using.
With this knowledge, you’re now able to restore the database by following the steps described here.