Whether you are developing or operating a WordPress website, regular site backup is extremely important. This allows you to easily commission your last job site if something unexpected happens. This process, although seemingly easy, can be very complex.
In this article, we are going to show you how to restore your WordPress site manually using cPanel and FTP assuming you have already made a backup.
Reasons to Restore a WordPress Website
Restoring a backup of your WordPress site is not something you will do often. However, when you do, it is important to follow the right steps. Some of the most common situations requiring website backup are:
Regardless of what happened to your site, you should prioritize fixing the problem and making website content accessible again. Restoring a site backup is the quickest way to recover from any unforeseen situation and it gives you time to resolve the issue.
Methods to Return a WordPress Site Backup
There are several ways to restore a WordPress site backup. One of them is using plugins such as UpdraftPlus and similar software. They allow you to make a complete backup of your site and restore it if necessary. But while these types of plugins provide many useful tools, they can be quite limited. For example, a feature that allows you to save your site’s backup does so exclusively in the server space where the plugin resides. Also, you may not be able to use the auto-backup restore option unless you can access the WordPress dashboard.
Another way to restore a WordPress site backup is the option included with your hosting plan. Many hosts offer this feature, while others offer this option as an add-on.
For example, this is an option for the Backup Wizard within a cPanel platform. It provides the option to restore a backup of the website.
As we mentioned, one of the main disadvantages of this method is that the hosting provider stores the backup of your website and your live site on the same server. If the server is compromised, your backup may also be lost.
Therefore it is recommended to save every website backup to your computer or a cloud platform.
The manual method of restoring a backup can be a little more complicated than the previous two. However, it’s the most reliable and often the only way available to get your site back on track, so let’s see how to do it.
How to Manually Restore a WordPress Website Backup
Manually restoring a WordPress site backup requires technical knowledge of the WordPress backend and how WordPress works. If you’re a beginner and not sure what to do, it might be best to leave that to someone more experienced. Whatever your decision, we’ll do our best to describe the entire process as accurately as possible.
To start restoring your site backup manually, you need to have a saved backup of your website’s WordPress files and database.
When you do that, you are ready to restore the WordPress website backup. This process consists of two steps:
Restoring WordPress Database Using cPanel and phpMyAdmin
To get started, log in to your hosting account to access cPanel or another available platform. Select the phpMyAdmin options in the Data base section.
If your host uses another platform, consult its documentation to access the phpMyAdmin option. When you get there, go to Data base tongue.
In the left panel, you will see a list of all databases stored on the server. Locate the database used on your WordPress website. If you don’t know which one it is, you can find out by opening the wp-config file and find value of variable ‘DB_NAME’.
Before starting the restore process, you will have the option to empty the existing database and import the saved backup or delete it and create a new database for this purpose. If you choose the latter, don’t forget to add the new database data by editing the wp-config.php file.
advice: If your website has been hacked and the database tables have been targeted, we recommend that you delete all database tables and then restore the database backup. Of course, this will only be possible if you have previously backed up the database.
To remove tables from the database, simply highlight them by clicking the Check All option near the bottom of the screen. Then select the Deposit option in the drop-down menu next to it.
This step of deleting tables from the database is recommended in case your site has been hacked, otherwise you can skip it as the next one will overwrite existing equivalent tables in the database.
Whether or not you deleted the database tables, once you are ready to restore the backed up version, click the button Import near the top of the screen with the relevant database selected in the left pane.
Then, in the File to import section, click on the Choose file and select the database backup from the location on your computer where you saved the backup file.
After choosing the database backup file from your computer, in the Format section, to select SQL in the drop-down list:
Finally, click on the Go button and import the database backup. It will take some time for phpMyAdmin to import your database backup. Once it imports a part of the website that includes your posts and pages, the site will be restored.
Restoring Website Files
The next step is to restore the WordPress files. For this, we will use an FTP client. This requires you to have an FTP account and FTP software such as FileZilla. You can verify or create an FTP account through cPanel in your hosting account.
Once you have found your FTP account and start a ftp-client to connect your computer and server, log in to establish the connection. When you log in, the left pane shows your local site with the files on your computer, while the right pane lists the remote site’s files on the server.
In the left panel, find the location where you saved the backup files from your WordPress site. Check if the files are unzipped. If they are not, extract them. Now in the right panel, if you haven’t already, navigate to the public_html folder.
The next step is to delete the old files from your server. Check if the file backup contains all the changes you wanted to save. This check is important because you will not be able to restore these changes after deleting the files from the server. To delete old files, simply right-click on the old folders and files you previously selected and press To erase.
Proceed by uploading save files from your computer. Using FileZilla, all you have to do is drag selected files from the local site in the left panel and drop them on the remote site in the right panel. The duration of this process depends on the size of your files.
Another way to restore your backup files is to use cPanel and the File Manager tool. Go to your hosting account and choose the File manager option.
In the file manager, find the public_html folder with your website’s WordPress installation. If there is more than one domain on the server, be sure to select the folder with your domain name. Once you have opened the folder containing your site files, select them, right-click on it and choose Delete.
When you empty the public folder, click the To download button in the options tab at the top. Now just navigate to the backup zip file you saved on your computer.
The download process may take longer depending on the file size. Once done, you will see an uploaded zip file in your public folder.
Right click on the file and select Extract to unzip the file.
Although this method has the same end result, we recommend that you restore the backup via an FTP client, as it will be faster and more efficient.
If you followed these instructions, your backup files and database should be restored to your server. Now is the time to check if everything is working properly, so head over to your website and do a quick check.
Start with plugins – check if they are installed and activated. If there are changes, activate them.
advice. Pay attention to the structure of the permalink. Restoring your site from a backup may change the permalinks – in this case posts and pages will not open in the browser. To check permalinks, go to Settings > Permalinks in the dashboard of your website.
If you are restoring your site from a hacker attack, it is recommended that you change the login information for both administrators and other types of users.
Moreover, you can create a new backup and install a security plugin to strengthen the security of your site.
Regular file backups are extremely important security measures for any site owner. They allow you to quickly restore your site from a malicious attack or a crash caused by an incompatible theme, bad plugins and software updates. While there are several ways to restore your site, the manual method is the only one that offers absolute control and security, so keep this tutorial handy in case you need it.