Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Export a WordPress Database Step by Step

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Exporting your WordPress database creates a backup of all your site’s content, settings, and user data. This guide shows you two reliable methods—using a plugin and using phpMyAdmin—so you can safely save or move your database.

What You'll Need

  • Access to your WordPress admin dashboard (for the plugin method).
  • Your hosting control panel login (usually cPanel or similar) for phpMyAdmin.
  • A secure place to store the exported file (your computer, cloud storage, or an external drive).

Step-by-Step

Method 1: Using a Plugin (Recommended for Beginners)

  1. Log in to your WordPress admin dashboard. This is typically at yoursite.com/wp-admin.
  2. Install a backup plugin. Go to Plugins → Add New, search for “UpdraftPlus” (a popular free option), and click Install Now, then Activate.
  3. Open the plugin’s backup settings. After activation, you’ll see a new “UpdraftPlus Backups” menu item in the left sidebar. Click it.
  4. Start a manual backup. Click the Backup Now button. A dialog will appear asking what to include—make sure “Database” is checked (you can also include files for a full backup).
  5. Choose where to store the backup. Select a remote storage option like Google Drive, Dropbox, or email, or leave it as “UpdraftPlus Vault” (requires account). For a simple download, choose “Download to your computer” if available, or use “Send to email”.
  6. Click “Backup Now” to start. The plugin will create a backup and show progress. Wait for it to finish.
  7. Download the database backup. After completion, go to the Existing backups tab. Find the latest backup, click the Database link (usually a file ending in .gz), and save it to your computer.

Method 2: Using phpMyAdmin (No Plugin Needed)

  1. Log in to your hosting control panel. This is usually cPanel, but it could be Plesk or a custom panel. Look for the “phpMyAdmin” icon under the “Databases” section.
  2. Select your WordPress database. In the left sidebar of phpMyAdmin, click on the database name that corresponds to your WordPress site. If you’re unsure which one, check your wp-config.php file for the DB_NAME constant.
  3. Click the “Export” tab. This is at the top of the phpMyAdmin screen.
  4. Choose the export method. Select Quick for a simple export (recommended for most cases), or Custom if you need to adjust options like compression.
  5. Select the format. Make sure “SQL” is selected in the format dropdown. If you chose Custom, you can also select “gzip” or “zip” compression to reduce file size.
  6. Click the “Go” button. phpMyAdmin will generate the export file and prompt you to download it. Save it to a safe location.

Common Mistakes

  • Exporting the wrong database. If you have multiple databases, you might export the wrong one. Double-check the database name in phpMyAdmin.
  • Not including all tables. When using Custom export, ensure all tables are selected. Excluding some can break your site upon import.
  • Skipping the file download. Some users click “Go” and forget to save the file when the download prompt appears. The export is lost.
  • Using an outdated plugin. An outdated backup plugin may not support your WordPress version. Keep plugins updated.
  • Storing backups only on the server. If your hosting account is terminated, you lose the backup. Always download a copy locally.

Tips

  • Export regularly. Schedule a backup before major updates, theme changes, or content additions.
  • Use both methods. If one fails, you have a fallback. A plugin backup is easier, while phpMyAdmin gives you more control.
  • Test your backup. Occasionally import the backup into a local test site to ensure it works.
  • Keep multiple copies. Store backups in at least two different places (e.g., cloud and external drive).
  • Note the database credentials. For phpMyAdmin, you’ll need your database username and password. These are in your wp-config.php file.

Troubleshooting

  • Export fails or times out. This often happens with large databases. In phpMyAdmin, choose Custom and enable “Compression” (gzip). Also try increasing the PHP memory limit in your hosting settings.
  • Plugin backup doesn’t complete. Check your hosting’s PHP execution time limit. You may need to increase it or use a different plugin. Alternatively, use phpMyAdmin.
  • Downloaded file is empty or corrupted. Try exporting again with a different method. If using a plugin, check if the plugin has a “resume” option. For phpMyAdmin, ensure you’re not using an old version.
  • Cannot find phpMyAdmin. Some hosts use a different tool like “MySQL Database” or “Database Manager”. Contact your host’s support for guidance.
  • Export works but import fails later. This is usually due to an incomplete export. Re-export with the “Quick” method in phpMyAdmin, or use a plugin that creates a complete backup.

Frequently Asked Questions

Can I export only the database without files?

Yes, both methods above export only the database. If you need a full site backup, you’ll also need to download your WordPress files via FTP or a file manager.

How often should I export my WordPress database?

It depends on how often you update your site. For a blog with weekly posts, a weekly export is reasonable. For an e-commerce site, consider daily exports.

What file format is the export?

Both methods produce a .sql file. phpMyAdmin may compress it as .gz or .zip if you choose that option. Plugins often compress it as .gz as well.

Do I need to export my database before updating WordPress?

Yes, it’s a good practice. Updates can sometimes fail or cause compatibility issues, so having a recent backup ensures you can restore your site if something goes wrong.

Can I export the database from the WordPress admin without a plugin?

No, WordPress does not have a built-in export tool for the database. You must use phpMyAdmin or a plugin.

Will exporting the database affect my live site?

No, exporting is a read-only operation. It does not change any data on your site.