Paramclasses Academy - Blog

Tutorials Details

←
Post 32 of 40
→

How to Backup and Restore in WordPress: Practical Website Recovery Guide ?

How to Backup and Restore in WordPress: Practical Website Recovery Guide ?

November 17, 2026

1. Introduction

A WordPress website contains important data such as pages, posts, images, user accounts, plugin settings, theme files, and website configurations. If your website gets hacked, a plugin update fails, files are deleted accidentally, or the hosting server crashes, you may lose important data.

A backup is a recoverable copy of your website that allows you to bring it back to a previous working condition.

In this tutorial, you will learn how to:

  • Understand WordPress files and database backups.

  • Create a complete manual backup using cPanel.

  • Export and import a MySQL database using phpMyAdmin.

  • Create automatic backups using UpdraftPlus.

  • Store backups safely in cloud storage.

  • Restore a website using a backup plugin.

  • Restore WordPress manually using files and database.

  • Test your restored website and prevent common backup problems.

Important: A backup is useful only when it can be restored successfully. Always test your backups before depending on them during an emergency.

2. What Is a WordPress Backup?

A WordPress backup is a copy of your website's files and database saved at a particular point in time.

WordPress stores website information in two main places.

A. WordPress Files

Website files are stored on your hosting server. Important files and folders include:

  • wp-admin – WordPress administration files.

  • wp-includes – WordPress core libraries.

  • wp-content – Themes, plugins, uploads, and other content.

  • wp-config.php – Database connection and configuration settings.

  • .htaccess – Server rules on Apache-based hosting, when used.

The wp-content folder is especially important because it contains your installed themes, plugins, and uploaded media files.

B. WordPress Database

The database stores dynamic website information, including:

  • Posts and pages.

  • Categories and tags.

  • Comments.

  • User accounts and roles.

  • Website settings.

  • Plugin and theme settings.

  • WooCommerce products and orders, when applicable.

A database backup is usually exported as a .sql, .sql.gz, or another database dump format.

Remember: Downloading your WordPress folder does not automatically back up your database. You need both files and database for a complete website backup.

For more details, read the official WordPress Backup Handbook.

3. Types of WordPress Backups

A. Full Backup

A full backup contains the website files and database.

It is useful when you need to restore the complete website after a serious problem.

B. Database Backup

A database-only backup stores posts, pages, settings, users, orders, and other database information.

It does not contain uploaded images, themes, plugins, or WordPress core files.

C. Files Backup

A files-only backup stores website files such as themes, plugins, media uploads, and configuration files.

It does not contain the database records.

D. Incremental Backup

An incremental backup stores changes made since a previous backup rather than copying every file again.

It can reduce storage requirements and backup time. However, incremental backup availability depends on the backup solution and plan you use.

4. Why Should You Back Up a WordPress Website?

Regular backups protect your website against several problems.

1. Hacking and malware: You may need a clean backup from before the security incident.

2. Plugin conflicts: A plugin update can sometimes break website functionality.

3. Theme problems: Incorrect theme modifications can damage the website layout.

4. Accidental deletion: You may accidentally delete important pages, images, or files.

5. Server failure: Hosting problems can make website files or databases unavailable.

6. Migration: A backup provides a recovery point before moving your website to another hosting provider.

5. Before Creating a Backup

Before starting, understand the following requirements:

  • A working WordPress website.

  • Access to the WordPress administrator dashboard.

  • Access to your hosting control panel, such as cPanel.

  • Access to phpMyAdmin for manual database backups.

  • Enough storage space for the backup.

  • A separate storage location, such as your computer or supported cloud storage.

If you are working on a live website, avoid performing unnecessary updates or content changes while creating a manual backup set.

For websites with frequent orders or user activity, use a backup solution that can create a consistent backup of both files and database. Consider maintenance mode or a suitable low-activity window when performing a manual restoration.

6. Method 1: Create a Manual WordPress Backup Using cPanel

In this method, we will download website files using File Manager and export the database using phpMyAdmin.

Step 1: Log in to cPanel

  1. Open your hosting provider's cPanel login page.

  2. Enter your username and password.

  3. Open the cPanel dashboard.

  4. Locate the File Manager option.

Step 2: Open File Manager

  1. Click File Manager.

  2. Open your website's document root folder.

  3. For many primary domains, this folder is public_html.

  4. If your WordPress installation is inside another directory, open that directory instead.

  5. Confirm that you can see WordPress folders such as wp-admin, wp-content, and wp-includes.

Do not assume every website is installed directly inside public_html. Check the domain's document root in your hosting panel.

Step 3: Compress WordPress Files

  1. Select the WordPress files and folders that belong to your installation.

  2. Click Compress in the File Manager toolbar.

  3. Select the ZIP Archive format.

  4. Enter a backup filename such as wordpress-files-backup.zip.

  5. Confirm the compression process.

Make sure hidden files are included where applicable, especially .htaccess.

Step 4: Download the ZIP File

  1. Locate the ZIP archive you created.

  2. Right-click the file.

  3. Select Download.

  4. Save it to your computer.

  5. Confirm that the downloaded archive is not empty and can be opened.

For additional safety, keep another copy in secure external storage.

Step 5: Open phpMyAdmin

Now we need to back up the WordPress database.

  1. Return to the cPanel dashboard.

  2. Find the Databases section.

  3. Click phpMyAdmin.

  4. Wait for the database management interface to open.

Step 6: Identify the WordPress Database

To identify the correct database:

  1. Open your WordPress installation's wp-config.php file using File Manager.

  2. Find the database configuration lines.

  3. Look for the database name defined by DB_NAME.

Example:

define( 'DB_NAME', 'param_classes_wp' );
define( 'DB_USER', 'param_user' );
define( 'DB_PASSWORD', 'your_database_password' );
define( 'DB_HOST', 'localhost' );

The example database name is param_classes_wp.

Never share your actual database password publicly. Do not copy real credentials into tutorials, screenshots, or support messages.

Step 7: Export the Database

  1. Open phpMyAdmin.

  2. Select the database identified in wp-config.php.

  3. Click the Export tab.

  4. Select Quick for a standard export.

  5. Select SQL as the format.

  6. Click Export or Go, depending on your phpMyAdmin version.

  7. Save the downloaded database file to your computer.

For larger or more complex databases, use the appropriate custom export settings or a command-line backup method provided by your host.

Official reference: WordPress Database Backup Guide.

Step 8: Organize Your Backup Files

Create a folder on your computer:

WordPress-Backup/
│
├── wordpress-files-backup.zip
├── wordpress-database-backup.sql
└── backup-notes.txt

In backup-notes.txt, record:

  • Website name.

  • Backup date and time.

  • WordPress installation URL.

  • Database name.

  • PHP and WordPress versions, if known.

  • Plugin or theme updates performed recently.

Do not store database passwords in an ordinary notes file.

You now have a manual backup containing both WordPress files and the database.

7. Method 2: Create an Automatic Backup Using UpdraftPlus

Manual backups are useful, but remembering to create them regularly can be difficult.

A backup plugin can automate the process.

For this tutorial, we will use UpdraftPlus, a popular WordPress backup plugin.

Step 1: Install UpdraftPlus

  1. Log in to your WordPress dashboard.

  2. Open Plugins → Add New Plugin.

  3. Search for UpdraftPlus.

  4. Find the official UpdraftPlus backup plugin.

  5. Click Install Now.

  6. Click Activate.

Step 2: Open Backup Settings

  1. Open Settings → UpdraftPlus Backups.

  2. Select the Backup / Restore tab.

  3. Review the available backup options.

Step 3: Create Your First Backup

  1. Click Backup Now.

  2. Make sure the option to include the database is selected.

  3. Make sure the option to include files is selected.

  4. Select remote storage if you have configured it.

  5. Start the backup process.

  6. Wait until the backup operation finishes.

The plugin may create separate backup components for:

  • Database.

  • Plugins.

  • Themes.

  • Uploads.

  • Other files.

Do not close the process prematurely. Large websites may take longer to complete.

Step 4: Configure Scheduled Backups

  1. Open the Settings tab inside UpdraftPlus.

  2. Locate the file backup schedule.

  3. Select an appropriate frequency.

  4. Locate the database backup schedule.

  5. Select an appropriate frequency.

  6. Configure how many backup sets to retain.

  7. Save the settings.

Choose the schedule based on how frequently your website changes.

For example:

  • A static business website may need less frequent backups.

  • A blog that publishes content daily may need daily database backups.

  • An active WooCommerce store may need much more frequent database protection because orders and customer activity can change throughout the day.

A schedule is not a guarantee. Check backup logs and notifications to confirm that backups are actually completing.

Step 5: Configure Remote Storage

Keeping all backups on the same hosting server is risky. If the server fails or gets compromised, your website and backups may be lost together.

UpdraftPlus supports supported remote storage destinations, depending on the plugin version and configuration.

  1. Open the plugin's Settings tab.

  2. Find the remote storage section.

  3. Select a supported storage provider.

  4. Follow the connection instructions.

  5. Authorize the connection.

  6. Save the configuration.

  7. Run a test backup.

  8. Confirm that the backup appears in the remote storage account.

Use a separate, protected cloud account and enable strong authentication.

Official guide: How to Back Up with UpdraftPlus.

8. How to Restore a WordPress Website Using UpdraftPlus

Suppose a plugin update has broken your website and you want to return it to a previous working version.

Follow these steps.

Step 1: Open UpdraftPlus

  1. Log in to the WordPress dashboard if it is accessible.

  2. Navigate to Settings → UpdraftPlus Backups.

  3. Open the Backup / Restore tab.

  4. Scroll down to Existing Backups.

Step 2: Select a Backup

  1. Review the available backup dates.

  2. Select a backup created before the problem occurred.

  3. Check that the backup includes the components you need.

  4. Click Restore.

If your backup is stored on your computer, use the plugin's upload-backup option or the documented local-folder rescan process to make the backup available.

Step 3: Select Backup Components

The restoration wizard may let you select:

  • Plugins.

  • Themes.

  • Uploads.

  • Other files.

  • Database.

For a complete website recovery, select all required components from the same compatible backup set.

If you are repairing only one component, restore only that component when you understand the impact.

Step 4: Start the Restoration

  1. Click Next.

  2. Review the selected components.

  3. Confirm the restoration.

  4. Wait for the process to complete.

  5. Read the restoration log.

  6. Follow any final instructions shown by the plugin.

Do not interrupt the restoration process.

Step 5: Verify Your Website

After restoration:

  1. Open your homepage.

  2. Check important pages and posts.

  3. Open the WordPress dashboard.

  4. Check images and media files.

  5. Test forms and navigation.

  6. Check plugin functionality.

  7. Test the website on mobile.

  8. Confirm that SSL and HTTPS are working.

Official guide: How to Restore a WordPress Backup.

9. Method 3: Restore WordPress Manually Using cPanel

Sometimes the WordPress dashboard is unavailable. In that situation, you may need to restore the website manually.

Warning: Manual restoration can overwrite current website data. Before replacing anything, preserve the current broken website's files and database if possible. This can help you recover recent content or investigate the original problem.

Step 1: Open cPanel File Manager

  1. Log in to cPanel.

  2. Open File Manager.

  3. Navigate to your WordPress installation directory.

  4. Identify the files and folders belonging to your website.

Step 2: Preserve the Existing Website

Before replacing the current files:

  1. Create an archive of the existing website files, if possible.

  2. Download the archive.

  3. Record the current database name and configuration.

  4. Keep a separate copy of the current database.

Do not delete the only available copy of your website.

Step 3: Upload the Backup ZIP

  1. Open the correct WordPress directory.

  2. Click Upload.

  3. Select your previously created backup ZIP.

  4. Wait until the upload completes.

  5. Return to File Manager.

  6. Select the ZIP file.

  7. Click Extract.

Extract the archive into the correct installation directory. Check the folder structure carefully to avoid creating an unnecessary nested folder.

Step 4: Check wp-config.php

Open wp-config.php and verify the database settings.

Example:

define( 'DB_NAME', 'param_classes_wp' );
define( 'DB_USER', 'param_user' );
define( 'DB_PASSWORD', 'your_database_password' );
define( 'DB_HOST', 'localhost' );

The database name, username, password, and host must match the database configuration on the current hosting server.

Do not replace working credentials with example values.

Step 5: Open phpMyAdmin

  1. Return to cPanel.

  2. Open phpMyAdmin.

  3. Select the destination WordPress database.

  4. Confirm that you selected the correct database before importing anything.

Step 6: Import the Database Backup

  1. Click the Import tab.

  2. Click Choose File.

  3. Select your SQL backup file.

  4. Review the import format.

  5. Click Import or Go.

  6. Wait for the import process to finish.

  7. Check for a success message.

A database import may replace existing tables or fail if the database is too large for the available upload limits. For large databases, ask your hosting provider about command-line import or an approved alternative.

Do not import a backup into a database containing important newer data unless you intend to replace that data.

Step 7: Test the Restored Website

Open your website and check:

  • Homepage.

  • Internal pages.

  • Images.

  • Login page.

  • Admin dashboard.

  • Navigation menus.

  • Forms.

  • Plugin functionality.

If the website uses a different domain or directory, additional URL and configuration adjustments may be required.

10. Restoring a Website to a Different Domain

Sometimes you may want to restore a backup to a new domain or staging environment.

For example:

Old Website:
https://oldexample.com

New Website:
https://newexample.com

WordPress stores site URLs and other references in its database. A simple text replacement directly inside an SQL file can damage serialized data stored by WordPress and plugins.

Use a WordPress-aware search-and-replace tool that understands serialized data.

A safer process is:

  1. Restore the files and database to the new environment.

  2. Verify the new database connection.

  3. Create a fresh backup before changing URLs.

  4. Use a reputable serialization-aware search-and-replace tool.

  5. Update the WordPress site address and home address as appropriate.

  6. Check menus, images, internal links, and plugin settings.

  7. Test the new website before switching DNS.

For advanced migrations, use the official WP-CLI Search-Replace documentation.

Do not run an ordinary SQL REPLACE() query across every database field without understanding the data structure.

11. Backup Storage and Retention Strategy

A good backup strategy should protect against both accidental deletion and hosting failure.

A. Follow the 3-2-1 Backup Strategy

Keep:

  • 3 copies of important data.

  • 2 different storage types or locations.

  • 1 copy off-site.

For example:

  1. Live website on hosting.

  2. Backup on a separate external drive.

  3. Backup in a secure cloud storage account.

Keep backup access credentials protected and separate from ordinary website administrator credentials.

B. Choose a Backup Schedule

Your schedule should depend on how frequently data changes and how much data loss you can tolerate.

A simple starting point:

  • Static website: periodic full backups and backups before major changes.

  • Frequently updated blog: regular database backups and scheduled file backups.

  • Active online store: frequent database backups and reliable file backups.

For a busy store, confirm that orders, customer accounts, and payment-related records are included in the backup and recovery plan.

C. Understand RPO and RTO

RPO – Recovery Point Objective

RPO describes how much recent data loss your business can tolerate.

For example, an RPO of one hour means the recovery plan aims to limit lost data to approximately the last hour.

RTO – Recovery Time Objective

RTO describes how long the website can remain unavailable before it needs to be restored.

For example, an RTO of four hours means the recovery plan aims to bring the website back within four hours.

These are recovery targets, not automatic guarantees. Your backup frequency, storage speed, hosting resources, and restoration process determine whether the targets are achievable.

12. Important Checks After Restoring WordPress

A successful import does not always mean the website is fully functional.

Complete these checks after every restoration:

1. Homepage: Confirm that the homepage loads correctly.

2. Permalinks: Open Settings → Permalinks and save the existing structure if required to refresh rewrite rules.

3. Images: Check whether uploaded images load correctly.

4. Plugins: Confirm that required plugins are active and working.

5. Themes: Verify the correct theme and child theme are active.

6. SSL: Confirm that HTTPS works without certificate errors.

7. Forms: Submit a test form and verify that notifications work.

8. WooCommerce: Check products, orders, checkout, and payment gateway configuration.

9. User accounts: Verify that administrator and customer login work correctly.

10. Scheduled tasks: Confirm that important scheduled actions and cron jobs are running.

11. Error logs: Review hosting and WordPress error logs for warnings or failures.

12. Security: Change exposed credentials and investigate the original incident before returning a compromised website to production.

13. Common WordPress Backup and Restore Problems

Problem 1: Backup Process Fails

Possible reasons:

  • Insufficient hosting storage.

  • PHP execution time limits.

  • Server resource restrictions.

  • Remote storage connection failure.

Solution:

  • Check available disk space.

  • Review the backup plugin log.

  • Try a smaller backup operation.

  • Ask the hosting provider about server limits.

  • Verify remote storage authorization.

Problem 2: Database Import Fails

Possible reasons:

  • Database file is too large.

  • PHP upload or execution limits are too low.

  • Wrong database selected.

  • Database user lacks sufficient permissions.

  • Database server version incompatibility.

Solution:

  • Confirm the database and file are correct.

  • Ask your hosting provider about database import limits.

  • Use an approved command-line import method for large files.

  • Review the exact import error before trying again.

Problem 3: Website Shows a White Screen

Possible reasons:

  • Incompatible plugin.

  • Theme error.

  • PHP fatal error.

  • Incomplete restoration.

Solution:

  • Review PHP error logs.

  • Check whether the restored files and database belong to the same backup set.

  • Temporarily disable the suspected plugin using a safe recovery method.

  • Verify PHP compatibility.

Problem 4: Images Are Missing

Possible reasons:

  • Uploads folder was not restored.

  • Incorrect file permissions or ownership.

  • Wrong website URL.

  • Incomplete file extraction.

Solution:

  • Confirm that wp-content/uploads exists.

  • Check the restored media files.

  • Verify the correct domain and file paths.

  • Ask the hosting provider to review ownership and permissions if necessary.

Problem 5: Website Redirects to the Old Domain

Possible reasons:

  • Old site URL remains in the database.

  • Incorrect WordPress URL settings.

  • Cached redirect rules.

  • Server configuration still points to the old domain.

Solution:

  • Verify WordPress Address and Site Address.

  • Use a serialization-aware search-and-replace process when migrating.

  • Clear relevant caches.

  • Review server redirect rules.

14. Backup Security Best Practices

Backup files may contain sensitive information, including database records, user details, and configuration files.

Follow these precautions:

  • Store backups outside publicly accessible website directories whenever possible.

  • Use encrypted storage for sensitive backup archives.

  • Restrict access to backup files.

  • Use strong authentication for cloud storage.

  • Never share database exports publicly.

  • Remove temporary backup archives from public locations after securely storing them.

  • Keep an off-site copy.

  • Test restoration regularly.

  • Keep a clean backup from before a security incident.

  • Do not assume that a backup plugin automatically protects the backup files from unauthorized access.

If your website is compromised, restoring a backup alone may not remove the cause of the compromise. Investigate and fix the vulnerability before bringing the site back online.

15. Practical Assignment

Create a backup and restore practice project using a local WordPress installation or a staging website.

Task 1: Create a Test Website

  1. Install WordPress on localhost or staging.

  2. Create three sample pages.

  3. Create two sample posts.

  4. Upload five images.

  5. Install a theme and two plugins.

Task 2: Create a Manual Backup

  1. Open the website directory.

  2. Compress the WordPress files.

  3. Export the database using phpMyAdmin.

  4. Save both backup files in a separate folder.

  5. Record the backup date.

Task 3: Create an UpdraftPlus Backup

  1. Install UpdraftPlus.

  2. Create a complete backup.

  3. Configure a suitable schedule.

  4. Connect remote storage if available.

  5. Verify that the backup is listed.

Task 4: Perform a Test Restoration

  1. Create a staging or separate local environment.

  2. Preserve its existing files and database.

  3. Restore the backup using UpdraftPlus or the manual method.

  4. Verify the website's pages, images, theme, and plugins.

  5. Record any problems and how you fixed them.

Task 5: Verify Recovery

Confirm that:

  • Homepage loads.

  • Admin dashboard works.

  • Posts and pages are available.

  • Images load correctly.

  • Plugins and theme work.

  • Forms function correctly.

Practical learning goal: You should be able to create a complete WordPress backup and restore it without depending entirely on the original hosting account.

16. Frequently Asked Questions

Q1. What should a complete WordPress backup include?

It should include the WordPress files and database. The database contains content and settings, while the files include themes, plugins, uploads, and configuration files.

Q2. Is the WordPress database backup enough?

No. A database-only backup does not include themes, plugins, uploaded images, or other website files.

Q3. Can I restore WordPress without a backup plugin?

Yes. You can restore files using cPanel File Manager or SFTP and import the database using phpMyAdmin or a suitable command-line tool.

Q4. Is UpdraftPlus free?

UpdraftPlus offers a free version and paid options. Features such as certain advanced backup and migration capabilities may depend on the plan.

Q5. Where should I store WordPress backups?

Store them in a secure location separate from the live hosting account, such as protected cloud storage or an external drive. Keep more than one copy when possible.

Q6. How often should I back up my website?

It depends on how often your website changes and how much recent data you can afford to lose. Websites with frequent customer orders need a more frequent database recovery strategy than static websites.

Q7. Can I restore a backup to another hosting provider?

Yes. You can restore the website files and database on the new host, update database credentials, and adjust URLs and server configuration when required.

Q8. How do I know whether my backup is working?

Check the backup logs, verify that the files are present and complete, and perform a test restoration in a staging or local environment.

17. Conclusion

WordPress backup and restoration are essential skills for every website owner and WordPress developer.

You have learned how to:

  • Understand WordPress files and database backups.

  • Create manual backups using cPanel.

  • Export databases using phpMyAdmin.

  • Automate backups with UpdraftPlus.

  • Restore websites using a plugin.

  • Restore files and databases manually.

  • Protect backup files using secure storage.

  • Verify website functionality after recovery.

The most important lesson is simple: Do not wait for a website failure to test your backup. Create backups regularly and verify that they can be restored successfully.

←
Post 32 of 40
→