fervor [>]CODING & CURIOSITY
FERVOR LEARNING SYSTEMTUTORIALS
← WordPress

WordPress / 3 MIN READ

WP Backup Database

How to backup your WordPress database

From the original Fervor library. Examples may use older package versions.

Tutorial: How to Back Up a WordPress Database Using WHM and cPanel

Backing up your WordPress database is crucial for securing your website’s data in case of updates, migrations, or unexpected issues. Since you have access to WHM and cPanel, you can back up your database with these tools effectively. Below is a step-by-step guide to help you through the process.


Table of Contents


What You Need

  • Access to your WHM and/or cPanel account.
  • Administrative credentials for both tools.
  • An FTP client (optional, for downloading backups).

Method 1: Backing Up the Database Using cPanel

Step 1: Log in to cPanel

  1. Open your web browser and go to your cPanel login page (e.g., yourdomain.com:2083 or yourhostingprovider.com/cpanel).
  2. Enter your username and password.
  3. Click Log In.

Step 2: Identify Your WordPress Database

  1. In the cPanel dashboard, go to the File Manager.
  2. Navigate to your WordPress installation directory (typically /public_html or a subfolder).
  3. Open the wp-config.php file and locate the following line:
    define('DB_NAME', 'your_database_name');
    
    Note down the database name (e.g., your_database_name).

Step 3: Use phpMyAdmin to Export the Database

  1. In cPanel, find and click on phpMyAdmin under the Databases section.
  2. Once phpMyAdmin opens, locate and click on your WordPress database in the left-hand panel.
  3. Click on the Export tab at the top.
  4. Under Export Method, select:
    • Quick: For a simple backup with default settings.
    • Custom: For advanced options like selecting specific tables.
  5. Ensure the format is set to SQL.
  6. Click Go to download the database file to your computer.

Method 2: Backing Up the Database Using WHM

Step 1: Log in to WHM

  1. Open your web browser and go to your WHM login page (e.g., yourdomain.com:2087 or yourhostingprovider.com/whm).
  2. Enter your root username and password.
  3. Click Log In.

Step 2: Use the Backup Tool

  1. In WHM, search for Backup in the search bar.
  2. Click on Backup Configuration and ensure backups are enabled:
    • Set up automatic backups if not already configured.
  3. To back up manually:
    • Go to Backup > Backup Now/Restore.
    • Select the account associated with your WordPress site.
  4. If you want to back up only the database:
    • Use the phpMyAdmin option within WHM or cPanel (refer to Method 1, Step 3).

Tips for Storing Backups

  1. Save Backups Locally:

    • After downloading the backup, save it on your local machine or an external drive.
  2. Use Cloud Storage:

    • Store backups on a cloud service like Google Drive, Dropbox, or AWS S3 for additional security.
  3. Keep Multiple Versions:

    • Retain several backup versions in case one is corrupted or incomplete.
  4. Automate Backups:

    • Use a plugin like UpdraftPlus or BackupBuddy to automate future backups and store them remotely.

Conclusion

Backing up your WordPress database is a simple yet essential task for safeguarding your website. Whether you use cPanel or WHM, the steps above provide a reliable way to download and store your database securely. Regular backups ensure you’re prepared for any issues, giving you peace of mind.

If you encounter any problems during the process, feel free to ask for additional guidance!

Keep your curiosity going.Explore more WordPress →
287 TUTORIALS · 22 TOPICSREADY