keepcalculator

06 Numbers and Powers

Restore WordPress Site from Backup: 3 Safe Ways

Card No. 06·34766 · Updated · Standard formula, shown below

Restoring a WordPress site from a backup is a critical skill for any site owner. Whether you’re recovering from a hack, a failed update, or a human error, knowing how to safely bring your site back to a working state can save you hours of stress. This guide walks you through three proven methods—using a plugin, using cPanel’s backup tools, and using phpMyAdmin for database restoration—with clear, step-by-step instructions.

What You’ll Need

  • A full backup of your WordPress site (files and database). If you don’t have one, stop and create one first.
  • Access to your hosting control panel (cPanel, Plesk, or similar).
  • FTP credentials (host, username, password) or a file manager in your hosting panel.
  • phpMyAdmin access (usually found in your hosting panel).
  • A text editor (like Notepad++ or Sublime Text) for editing configuration files.

Step-by-Step

Method 1: Restore Using a Backup Plugin (Recommended for Beginners)

  1. Install a backup plugin (e.g., UpdraftPlus, BackupBuddy, or Jetpack). If your site is completely down, you’ll need to install it via FTP or your hosting file manager. Download the plugin’s .zip file, upload it to /wp-content/plugins/, and extract it.
  2. Activate the plugin from the WordPress admin dashboard. If the site is broken, you may need to activate it via phpMyAdmin by updating the active_plugins option in the wp_options table.
  3. Navigate to the plugin’s restore section. For UpdraftPlus, go to Settings > UpdraftPlus Backups and click the Restore button next to your backup.
  4. Select what to restore. Choose the components you want to restore—usually all of them (files, database, plugins, themes, uploads).
  5. Confirm the restoration. The plugin will download the backup files (if stored remotely) and restore them. This can take a few minutes.
  6. Check your site. Once done, visit your homepage and a few inner pages to ensure everything works. If you see errors, proceed to the Troubleshooting section.

Method 2: Restore Using cPanel (File Manager + phpMyAdmin)

  1. Log into cPanel and open File Manager. Navigate to public_html (or the folder where your WordPress is installed).
  2. Delete all existing files in that directory. Be careful—this removes the current site. If you have any doubts, download a copy first.
  3. Upload your backup files. If you have a .zip file, upload it and extract it here. If you have individual files, upload them directly.
  4. Restore the database. Go back to cPanel and open phpMyAdmin. Select your WordPress database (usually listed in wp-config.php).
  5. Import the database backup. Click the Import tab, choose your .sql file, and click Go. This will replace the current database with your backup.
  6. Update the configuration. If your site URL or database credentials changed, edit wp-config.php with the correct DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST.
  7. Test the site. Clear your browser cache and visit your site. If you see a database connection error, double-check the credentials in wp-config.php.

Method 3: Manual Restore via FTP (When You Have No Plugin or cPanel)

  1. Connect to your server via FTP using a client like FileZilla. Log in with your FTP credentials.
  2. Navigate to your WordPress root directory (e.g., public_html).
  3. Upload your backup files. If you have a .zip, upload it and extract it on the server (using your host’s file manager or SSH). If you have a folder, upload its contents directly.
  4. Restore the database via phpMyAdmin as described in Method 2, steps 4-5.
  5. Check wp-config.php. Ensure it points to the correct database and credentials.
  6. Test the site. If you get a “Error establishing a database connection,” your credentials are wrong. If you get a 500 error, permissions may be incorrect—set files to 644 and folders to 755.

Common Mistakes

  • Restoring the database before the files—or vice versa—without checking compatibility. Always restore files first, then the database, or use a plugin that handles both.
  • Forgetting to update wp-config.php when your database credentials or host have changed.
  • Using an outdated backup—restoring a backup from months ago will lose recent content, orders, or user registrations.
  • Not clearing caches after restore, which can make it look like the restore failed when it actually worked.
  • Skipping a test—always test your site thoroughly after restoration, including login, forms, and any custom functionality.

Tips

  • Always keep at least two recent backups—one on your server and one offsite (e.g., Google Drive, Dropbox, or a local drive).
  • Before restoring, take a fresh backup of your current broken site—this gives you a fallback if the restore goes wrong.
  • Use a staging site to test the restoration process if possible, especially for large or complex sites.
  • Write down your database credentials and keep them in a secure password manager.
  • If your backup is large, increase your PHP memory limit and execution time in wp-config.php or .htaccess to avoid timeouts.

Troubleshooting

  • Site shows “Error establishing a database connection”—Check your wp-config.php for correct DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST. Also verify that the database exists in phpMyAdmin and that the user has privileges.
  • 500 Internal Server Error—This often indicates a corrupted .htaccess file or incorrect file permissions. Rename .htaccess to .htaccess_old and try again. If that works, go to Settings > Permalinks and click Save to regenerate it.
  • White screen of death (blank page)—Enable WordPress debugging by adding define('WP_DEBUG', true); to wp-config.php. This will show error messages that point to the cause (often a plugin or theme conflict).
  • Site loads but looks broken (missing styles/images)—This usually means your site URL is wrong. Go to Settings > General in wp-admin and correct the WordPress Address and Site Address. If you can’t access wp-admin, use phpMyAdmin to update the siteurl and home options in the wp_options table.
  • Login redirects back to the login page—Clear your browser cache and cookies. If that doesn’t help, check your wp-config.php for any hardcoded URLs.
  • Restore process times out—If you’re using a plugin, try increasing the PHP memory limit and max execution time. For manual methods, split the backup into smaller parts (e.g., upload files in chunks).

Frequently Asked Questions

Can I restore a WordPress site without a backup?

No, you need a backup. If you don’t have one, contact your hosting provider—they may have a server-level backup they can restore for you.

How long does it take to restore a WordPress site?

It depends on the size of your site and the method. A small site via plugin can take 5-10 minutes; a large site via FTP could take an hour or more.

Will restoring my site delete my current content?

Yes, the restore process replaces your current files and database with the backup. That’s why it’s wise to back up your current state first.

What if my backup is corrupted?

Try downloading it again from your offsite storage. If it’s still corrupted, you may need to use an older backup or contact your hosting provider for assistance.

Do I need to update WordPress after restoring?

It’s recommended to update WordPress, themes, and plugins to their latest versions after a restore, but only after confirming the site is stable. Make a fresh backup before updating.

Can I restore only the database without touching files?

Yes, you can. Use phpMyAdmin to import your .sql file, and leave your files as they are. This is useful if you only need to roll back content changes.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →