Security & SSL

How to Restore a WordPress Backup from cPanel

Learn step by step how to restore a WordPress backup from cPanel and get your website back online in minutes.

Hand holding a brass padlock, symbolizing security and protection

To restore a WordPress backup from cPanel you need to recover two things: the website files and the MySQL database. With cPanel access, the entire process takes under 20 minutes.

This guide covers the two main methods available in cPanel — the File Manager paired with phpMyAdmin, and the native Backup Wizard tool — plus the steps to verify the restoration completed correctly.

Before You Start: What You Need

Confirm you have the following on hand before starting:

  • Access to your hosting cPanel account.
  • Your backup file: it can be a .zip, .tar.gz, or a .sql database dump.
  • The name, username, and password for the WordPress database (found in wp-config.php).
  • Enough disk space to extract the files.

If your hosting plan includes automatic backups, check the JetBackup or Backup Wizard section of cPanel first — many plans include it at no extra cost.

Method 1 — Restore Using cPanel's Backup Wizard

This is the simplest path when the backup was generated by cPanel itself.

Step 1: Open Backup Wizard

Log into cPanel → Files section → Backup Wizard. Click Restore.

Step 2: Restore the Home Directory Files

Select Home Directory, upload your .tar.gz backup file, and click Upload. cPanel will extract the files to /home/yourusername/.

Step 3: Restore the MySQL Database

Return to Backup Wizard → Restore → MySQL Database. Upload the .sql.gz file and confirm. cPanel will automatically import the tables into your existing database.

Step 4: Verify wp-config.php

Open File Manager, navigate to public_html/wp-config.php, and confirm that DB_NAME, DB_USER, and DB_PASSWORD match your current database credentials.

Method 2 — Manual Restore (File Manager + phpMyAdmin)

Use this method when the backup came from a different server or external tool.

Step 1: Upload the File to the Server

In cPanel → File Manager, open public_html and delete or rename its current contents if you want a clean replacement. Then click Upload and load your .zip or .tar.gz.

Step 2: Extract the Archive

Right-click the uploaded file → Extract. Make sure WordPress files (including wp-config.php) end up directly inside public_html, not in a subfolder.

Step 3: Import the Database in phpMyAdmin

  1. Go to cPanel → Databases → phpMyAdmin.
  2. Select your WordPress database in the left panel.
  3. Click the Import tab.
  4. Upload the .sql file and click Go.

If the file exceeds phpMyAdmin's upload limit (usually 50–256 MB), upload it via FTP to /home/yourusername/ and import it from the terminal:

mysql -u DB_USER -p DB_NAME < backup.sql

Step 4: Review and Update wp-config.php

If you're restoring to a different domain or server, also update siteurl and home. Do this in phpMyAdmin: open the wp_options table, filter by option_name = 'siteurl' and 'home', and edit the values.

Troubleshooting Common Issues

Symptom Likely Cause Solution
500 error after restore Incorrect file permissions Set directories to 755, files to 644 via File Manager
White screen of death Incompatible plugin or low memory Rename wp-content/plugins folder to deactivate all plugins
Database connection error wp-config.php credentials don't match Check DB_NAME, DB_USER, DB_PASSWORD, DB_HOST
Broken images or styles Site URL differs from original backup Update siteurl and home in the wp_options table

Best Practices After Restoring

  • Delete the backup file from the server once the restore is confirmed.
  • Regenerate permalinks: WordPress → Settings → Permalinks → Save Changes.
  • Update WordPress core, plugins, and themes to their latest versions.
  • Change admin and database passwords if you suspect the site was compromised.
  • Enable automatic backups so this process is the exception, not the rule.

If your hosting plan doesn't include automatic backups, consider upgrading to one that does. At elenlace.com you'll find plans with daily backups built in, so recovery is always just a few clicks away.

For more articles on keeping your site protected, browse our security and SSL section.

Key Takeaways

  • A WordPress restore requires recovering two components: site files and the MySQL database.
  • cPanel offers two paths: Backup Wizard (faster) or manual via File Manager + phpMyAdmin.
  • Always verify wp-config.php after restoring to ensure the database credentials match.
  • If switching domains or servers, update siteurl and home in the wp_options table.
  • The most common errors (500, white screen, DB connection failure) have straightforward, well-documented fixes.

Did your site go down or get hacked? Don't wait — reach out to our team and we'll help you restore and secure your WordPress today.

FAQ

Can I restore a WordPress backup without cPanel access?

Yes, as long as you have FTP/SFTP access and a terminal (SSH). Upload files via FTP and use the mysql command to import the SQL dump. Without any of these, you'll need to contact your hosting provider.

How long does it take to restore a WordPress site?

It depends on backup size. A standard 500 MB–1 GB site typically takes 10 to 30 minutes. Sites with large databases or many images may take longer if the server has limited bandwidth.

Does the restore overwrite existing files?

In cPanel's Backup Wizard, yes: restored files replace existing ones with the same name. If you want to keep both versions, move your current content to a different folder first.

What if the backup file is corrupted?

cPanel will show an error during import. Verify the file wasn't corrupted during download by comparing file size or MD5 checksum. If the original backup is damaged, check whether your hosting keeps older copies in JetBackup or a similar tool.

Useful resources

Other providers and guides worth comparing:

← All