Restore a Previous Version of Your Website
If your website shows errors, has been hacked, or broke after an update, you can usually get it back by restoring a previous copy. This guide explains which method to use and how to do it.
There are three ways to go back to an earlier version. Choose the one that matches what you need to restore.
- A single post or page: use WordPress revisions (see below)
- Site files, databases or email: use a backup from your control panel
- Your whole account after a serious failure: contact Hostking support
Step 1: Work Out When It Last Worked
Before you restore, decide which copy to use. Think about when the problem started.
- Broke after a WordPress update? Restore to the day before the update.
- Broke after installing a plugin? Restore to a point before the plugin was installed.
- Hacked? Restore to the last backup you know was clean. This is often more than a few days ago.
Backups are kept as daily copies for a limited time. Check your control panel to see which dates are available to you.
Step 2: Try a Quick Fix First
If the problem started after a WordPress update or plugin change, try these checks before a full restore.
Plugin conflict
- Log in to your WordPress admin area (wp-admin).
- Go to Plugins.
- Deactivate all plugins.
- If the site works, reactivate the plugins one at a time until the problem returns.
Theme problem
- Go to Appearance and then Themes.
- Activate a default WordPress theme, such as Twenty Twenty-Four.
- If the site works, the problem is with your theme.
Memory limit errors
If you see memory errors, read How to Increase PHP Memory Limit in DirectAdmin in the help centre.
If none of these fix the problem, go to Step 3.
Step 3: Restore from a Backup
Restore a single post or page (WordPress revisions)
WordPress saves earlier versions of posts and pages as revisions. Revisions only cover post and page content. They do not restore theme files, plugin files or site settings.
- Open the post or page in the editor.
- Find the Revisions panel in the settings sidebar.
- Select the version you want.
- Click Restore This Revision.
If you use the Classic Editor and cannot see revisions, click Screen Options in the top right corner and tick Revisions. The current version is not deleted when you restore an earlier one.
DirectAdmin
Menu names can differ between DirectAdmin versions. If the names below do not match, look for a similar option.
- Log in to DirectAdmin.
- Go to Advanced Features, then Create/Restore Backups.
- Click Restore.
- Select a backup from the drop-down list.
- Select the items you want to restore, such as website files, databases or email.
- Click Restore.
- Wait for the confirmation message Restore Complete.
Restoring overwrites the existing data for the items you select. Restores run in the background. DirectAdmin sends a notification when the restore has finished.
For a full guide, read How to Restore Your Website from a Backup in DirectAdmin (JetBackup).
cPanel
If your account uses cPanel, go to Files then Backup Wizard.
- Click Restore.
- Choose the type to restore: Home Directory, MySQL Databases, or Email Forwarders & Filters.
- Click Choose File, select your backup file, then click Upload.
- Wait for the restore to finish.
Warning: A Home Directory restore overwrites your current website files. It can also roll back email files. If you only need the website files or a database, restore just that part.
Step 4: Check for the Cause
If your site was hacked, restoring alone is not enough. The weakness that allowed the attack may still be there. After you restore:
- Update WordPress core, all plugins and your theme.
- Change your WordPress admin password.
- Change your hosting account password.
- Install a security plugin such as Wordfence and run a scan.
For more detail, read My WordPress Site Was Hacked — How to Clean and Recover It.
Troubleshooting
I cannot log in to wp-admin
- Use your file manager in DirectAdmin or cPanel to check that the WordPress files are present.
- Check that the restore has finished. Look for the confirmation message or notification.
I cannot restore a full account backup
Some full account archives cannot be restored by you. Contact Hostking support and say which date you need. Our team can restore the backup for you and look into the cause.
Need Help?
Our support team is available every day from 05:00 to 20:00 UTC by live chat at hostking.host. You can also open a support ticket from the client area.
