Restoring a whole site
When a site breaks, you can restore it from backup by choosing a restore point that predates the problem, then restoring both files and database from that same timestamp. Anything created after the restore point, such as orders or form submissions, will be lost and may need re-entering. After restore, clear caches to see the restored version and verify logins, plugins and content work correctly.
Restoring a whole site
You roll a whole site back by picking a restore point, then restoring the site’s files and its database from the same point in time. Files alone do not fix WordPress. The database holds orders, users and content changes, so restore both together and expect anything created after that point to be missing.
On Hostworld shared, reseller and WordPress hosting, you do this in cPanel. If you only have a full cPanel account backup, we restore that for you in WHM on request via a support ticket.
Before you start
This picks up from a Hostworld cPanel account you can already sign in to. If you are not on our hosting or you cannot reach cPanel, the steps below will not match what you see.
- Know your timeline. Write down when the site started misbehaving and your last known good time. You will pick a backup that predates the break but includes the content you want to keep.
- Expect a reversion. Restores overwrite. Files restored from backup replace current copies and deleted files are brought back. Database restores replace the current data with the backup’s data. There is no merge.
- Plan for the gap. Anything added after the restore point will be gone after you roll back. That includes WooCommerce orders, new users, comments and most form entries. WooCommerce calls this the gap period. You may need to re‑create or import those gap orders later.
- Match files and database. WordPress needs files and database from the same point in time. Mixing dates can break logins, plugins or content.
- Know your options in cPanel.
- File and Directory Restoration restores files from server‑held local backups if enabled on your server. You can choose a date for a path such as public_html. If you do not see it or it shows no backups, it is not available on your server.
- Backup lets you restore partial components you have on your computer. You can upload a Home Directory backup and individual MySQL or MariaDB database backups. This does not restore a full account in one click.
- Account Backups may appear in cPanel as dated server‑generated backups you can download. Presence and retention are provider‑controlled.
- Full account backups cannot be auto‑restored in cPanel. Full account restores are done in WHM by us on request.
- Caching can hide the result. After a restore, clear any cache plugin and CDN cache so you see the restored version, not a stale copy.
- When to ask us. If you need a full account reverted, if you only have a full cPanel backup file, or if you want a specific server‑held backup restored, open a support ticket. Tell us the domain, cPanel username and the exact date and time you want.
Step 1: Decide your restore point
Pick a timestamp that is after your last known good content but before the site broke. If your cPanel has File and Directory Restoration, you can preview available file versions per directory. Open cPanel, look for Files, then File and Directory Restoration. Browse to public_html. The Backups panel lists versions by date. Note down the timestamp you intend to use for files.
If you are restoring from backup files on your computer, make sure you have both a Home Directory backup and a database backup created around the same time. They must match.
Undo step: If you are unsure between two dates, write both down. You can re‑run the file restore to a different timestamp. For the database, keep the current database safe so you can switch back or re‑import if needed, as described below.
Step 2: Protect an undo path before changing anything
You want a way back if the chosen point is wrong.
- Files: In cPanel’s File Manager, rename
public_htmltopublic_html.pre-restoreand create a new emptypublic_html. This gives you a clean target and keeps today’s copy intact. If you must restore into the existing folder, at least download a copy of key files such aswp-config.php. - Database: Only restore a database when you have a backup file you can re‑import if you change your mind. If your workflow allows restoring into a new database rather than overwriting the existing one, prefer that approach, then point WordPress to it in
wp-config.php. That preserves an undo.
Undo step: If the restored site is worse, reverse your file rename so public_html.pre-restore becomes public_html again, and revert any wp-config.php changes so WordPress points back to the original database. Or re‑import the previous database backup file if you overwrote it.
Step 3: Restore the site files to the chosen point
Option A: Use cPanel’s File and Directory Restoration (if present)
This restores files from server‑held local backups.
- In cPanel, open Files, then File and Directory Restoration.
- Browse to
public_htmlor the specific subdirectory you need. - In the Backups panel, select the date and time you noted. Confirm the restore.
This brings back deleted files and overwrites same‑named files with the backup’s versions. It does not remove extra files that were not in the backup. If you created an empty public_html in Step 2, the restore will repopulate it cleanly.
Undo step: Reopen File and Directory Restoration and run it again for the same path, selecting a different timestamp. Or switch folder names back as described above.
Option B: Restore a Home Directory backup you hold
This restores files you have on your computer.
- In cPanel, open Files, then Backup.
- Under Restore a Home Directory Backup, click Choose File. Select your Home Directory backup file.
- Click Upload and wait for the restore to complete.
Make sure the Home Directory backup’s timestamp matches your database backup. This restore overwrites same‑named files but does not remove extra items that were not in the backup. A clean folder from Step 2 avoids leftovers.
Undo step: Upload a different Home Directory backup created at another time, or switch folder names back if you kept a safety copy.
Option C: You only have a full cPanel backup file
cPanel cannot automatically restore a full account backup. That feature lives in WHM. Your options are:
- Ask us to do a full account restore to a given timestamp in WHM. This is the right path when you want the whole account, including files and databases, reverted together. Open a support ticket and include the exact date and time.
- Manual file‑only recovery: if you cannot wait, extract the full backup
.tar.gzon your computer, find the contents ofhomedir/public_html, and upload them via File Manager into an emptypublic_html. Then restore the database separately in the next step. Be aware this is not a full account restore and can leave extra files behind unless you prepared a clean folder.
Undo step: If we performed the full restore, we can restore again to a different date if available. If you manually uploaded files, switch the folder names back or restore a different set of files from your safety copy.
Option D: You want us to restore server‑held backups
The File and Directory Restoration tool only works with local server backups. To restore from remote backup locations or when you want a full account brought back, we restore in WHM. Open a support ticket with your domain, cPanel username and the exact date and time you want.
Step 4: Restore the database from the same point
Restore the WordPress database backup that matches the file restore point. This avoids file and database mismatches.
- In cPanel, open Files, then Backup.
- Under Restore a MySQL Database, click Choose File and select your database backup file.
- Click Upload and wait for the import to finish.
This replaces the current database with the content of the backup. There is no merge. Expect WooCommerce orders, new users, comments and form entries created after this backup’s timestamp to be absent after the restore. If your WooCommerce store uses High Performance Order Storage, orders live in dedicated WooCommerce tables. Factor that into any plan to import gap orders later.
Undo step: Keep the previous database copy so you can re‑import it if needed. If you restored into a separate database and pointed WordPress to it, switch the wp-config.php settings back to the original database to undo.
Step 5: Point WordPress at the restored database and verify
WordPress reads its database credentials from wp-config.php in public_html.
- Open
wp-config.phpin cPanel’s File Manager editor. - Check
DB_NAME,DB_USERandDB_PASSWORD. If you restored into a new database, update these values to match that database. Save the file. - Load your homepage and log in to
/wp-admin/.
Undo step: If the change makes the site worse or you pointed to the wrong database, restore your saved copy of wp-config.php or put the old values back.
Step 6: Fix URLs and permalinks if needed
If the site URL changed during the restore or if you moved between domains, update it in WordPress Settings. Then refresh permalinks to fix 404s and regenerate .htaccess rules.
- In WordPress, go to Settings, then General. Check WordPress Address (URL) and Site Address (URL). Correct them if needed and Save.
- Go to Settings, then Permalinks. Click Save Changes without altering the structure to regenerate rewrite rules.
Undo step: If a URL change breaks access, put the previous values back. You can also restore the prior .htaccess from your file safety copy.
Step 7: Clear caches so you see the restored site
- If you use Cloudflare or another CDN, purge cached content. Purge single URLs if you are narrowing down, or Purge Everything if you need to clear the lot.
- If you use a page cache plugin, purge or clear its cache in the plugin’s settings.
Undo step: Cache purges do not change your files or database. There is nothing to undo, but you can wait for cache to warm back up under normal traffic.
Step 8: Check the site end to end and reconcile the gap
- Visit key pages and a few posts. Confirm menus, images and downloads work.
- Log in to WordPress. Check Plugins and Themes for errors.
- Re‑test forms. Submit a test message. Check it arrives.
- If you run WooCommerce, review Orders. Expect missing orders that fell in the gap period between the backup and now. Use WooCommerce export and import tools to recreate them if you have a copy of the gap data. If you use High Performance Order Storage, ensure your export and import cover the dedicated order tables.
Undo step: If you restored the wrong point, repeat the file and database restore steps using the other timestamp you noted in Step 1. Your folder safety copy and database backup give you a way back.
Step 9: When to ask Hostworld to restore for you
Some restores are better done by us. We use WHM to restore full cPanel accounts and to pull in remote backups when needed.
- You want a full account restore to a specific date.
- You only have a full cPanel backup file.
- You do not see File and Directory Restoration in cPanel, or it shows no backups.
- You want a server‑held backup restored to a specific path or date.
Open a support ticket and include:
- Domain and cPanel username.
- The exact date and time you want to restore to.
- Confirm you want both files and databases restored. Tell us about email if that matters for your account.
- Any constraints about the gap period you need us to be aware of.
We will confirm what backup points are available and carry out the restore in WHM. If the first point you choose does not resolve the issue, tell us the next timestamp and we can run it again.
What next
If this rollback got you stable, take a breath, then plan how to avoid the same failure. If you run your own server or want more control over scheduling and retention, have a look at our Linux VPS in London. If you are comparing hosting and server options, our VPS section has more background in our VPS guides.
If you need Hostworld to perform a full account restore or to restore a server‑held backup to a specific point, please open a support ticket with the details listed above.
Common questions
Will restoring files alone fix my WordPress site?
No. WordPress needs files and the database to match the same moment in time. Files alone can bring templates back, but posts, orders and users live in the database. Restore both together.
I do not see File and Directory Restoration in cPanel. Can I still roll back?
Yes. You can restore partial backups you hold via cPanel’s Backup interface. For a full account restore or to use server‑held backups, we need to do it in WHM. Open a support ticket with your target date and time.
Can I restore from a full cPanel backup file myself?
Not automatically in cPanel. That function exists in WHM. You can extract the full backup on your computer and upload public_html manually as a file‑only recovery, then restore the database separately. For a true full account restore, ask us to run it in WHM.
Will a restore remove hacked or extra files?
Not by default. Restoring files overwrites matching files and brings back deleted ones, but it does not purge extra files that were not in the backup. For a clean rollback, prepare an empty public_html before restoring or ask us to do a full account restore.
The site still looks wrong after a restore. What should I check?
Clear caches first. Purge any CDN such as Cloudflare and clear your page cache plugin. Then check wp-config.php points to the intended database, confirm WordPress and Site URLs in Settings, and re‑save Permalinks to regenerate .htaccess. If that does not sort it, consider a different restore point.