Beginner’s Guide to WordPress Database Backup

Short answer: A WordPress database backup copies your site’s content and settings stored in MySQL. You can do it manually via phpMyAdmin (export the database) or use a plugin like UpdraftPlus or WPvivid. Always store backups off-site and test restores regularly.

Key takeaways

  • Back up your database before any major update or migration.
  • phpMyAdmin export is free and reliable for manual backups.
  • Plugins simplify automated backups on a schedule.
  • Store backups in multiple off-site locations.
  • Test your backup by restoring to a staging site.
  • Don’t confuse database backup with full site backup.

Your WordPress database is the heart of your site. It stores every post, page, comment, user profile, and plugin setting. Lose it, and you risk losing everything. That’s why a reliable WordPress database backup isn’t optional; it’s essential. Whether you’re preparing for a migration, updating core software, or just sleeping better at night, this guide walks you through the two main approaches: manual backups via phpMyAdmin and automated backups with plugins. I’ll also share best practices and common pitfalls so you never lose data.

phpMyAdmin export screen showing the Export tab
phpMyAdmin export screen. — Photo: 27707 / Pixabay

What Is a WordPress Database Backup?

A database backup creates a copy of your site’s structured data. Unlike a full site backup (which includes themes, plugins, and uploads), the database alone holds dynamic content. In MySQL terms, it’s an SQL dump — a file containing all table data and structure. You can restore it later to rebuild your content.

When should you back up the database? Before any major change: theme switch, plugin install, core update, or especially a WordPress migration. Also schedule regular backups — weekly for active blogs, daily for e-commerce sites.

Manual Database Backup via phpMyAdmin

phpMyAdmin is a free web-based tool included in most hosting control panels (cPanel, Plesk, etc.). It lets you export and import MySQL databases directly.

Step-by-Step: Export Your Database with phpMyAdmin

  1. Log into your hosting control panel and open phpMyAdmin. Usually found under “Databases” in cPanel.
  2. Select your WordPress database from the left sidebar. The name typically starts with your hosting username and includes “wp_” tables.
  3. Click the “Export” tab at the top of the screen.
  4. Choose “Quick” export method — this exports all tables in one SQL file.
  5. Click “Go” to download the .sql file to your computer.

That’s it. You now have a snapshot of your database. Store this file somewhere safe — not just on your local machine. Use cloud storage like Google Drive or Dropbox, and keep at least two copies off-site.

One caveat: phpMyAdmin exports can time out on large databases (over 100 MB). If that happens, use the “Custom” export method and compress with gzip. Or switch to a plugin-based approach.

UpdraftPlus backup plugin settings on a WordPress dashboard
UpdraftPlus backup plugin settings. — Photo: RealAKP / Pixabay

Automated Database Backup with Plugins

Manual backups work, but they’re easy to forget. Plugins automate the process on a schedule, and many send backups to remote locations like email, Dropbox, or FTP. For a detailed comparison of manual vs. automated strategies, see Manual vs Automated WordPress Backups: Which Strategy Wins?. Here are two free plugin options I recommend:

PluginKey FeaturesBest For
UpdraftPlusSchedule backups, send to cloud, one-click restore.Most users: easy setup and multi-cloud support.
WPvivid BackupSupports database-only backup, staging, remote storage.Users who want staging integration and flexible backup parts.

To set up UpdraftPlus: install the plugin, go to Settings > UpdraftPlus, choose what to back up (select only “Database” for a pure DB backup), set a schedule (e.g., weekly), and pick remote storage (like Google Drive). Then run the first backup manually. The plugin handles restores too.

Remember: a plugin is only as good as its restore. Always test by restoring to a staging site or temporary domain. If you can’t restore, the backup is worthless.

Database Backup vs. Full Site Backup

A common mistake is assuming a database backup covers everything. It doesn’t. Your database lacks media files, plugins, themes, and uploaded images. For a migration, you typically need both. Learn how to combine them in How to Back Up a WordPress Site Before Migration – Step by Step. Use a plugin that supports full backups, or manually download your wp-content folder.

If you only back up the database and lose your server, you’ll have content but no design or functionality. Conversely, if you only back up files, you lose all content. A complete backup strategy includes both.

Best Practices for Database Backups

These rules keep your data safe:

  • Store off-site. Don’t keep backups on the same server — a server failure would destroy both.
  • Keep multiple versions. Retain at least three different backup dates. A corrupted database today might go unnoticed. With older copies, you can roll back.
  • Name backups clearly. Include the date and a note like “pre-migration” so you know which is which.
  • Test restores quarterly. Set a calendar reminder. If you’ve never restored, you don’t have a backup.
  • Secure the backup file. An SQL file contains raw data. If someone obtains it, they have all your user info. Encrypt sensitive backups or store them access-controlled.

Common Mistakes and How to Avoid Them

Even experienced developers slip up. Here are repeat offenders:

  • Exporting the wrong database. Double-check the database name. Some hosts create multiple databases for different sites.
  • Using the “Custom” export incorrectly. If you change export options without knowing what they do, you might miss tables. Stick with “Quick” unless you need compression.
  • Assuming backups happen automatically after plugin setup. Always run the first backup manually and verify the remote storage received it.
  • Skipping the restore test. Backups can be corrupt. Always restore to a staging environment after a major change or before relying on a backup.
  • Not backing up before migration. Migration modifies the database. Without a fresh backup, you can’t roll back if something breaks. Always back up immediately before starting.

Restoring a Database Backup

Restoring is the reverse of exporting. In phpMyAdmin: select your database, click “Import”, choose the .sql file, and click “Go”. If you’re restoring to a brand new site, you must have a fresh WordPress installation first. For plugin restores, follow the plugin’s restore wizard.

A quick tip: if the import fails due to file size, split the SQL file into smaller chunks using a script or use a plugin import tool. Some hosts offer a command-line import via SSH, which handles large files easily.

Keep calm. A good backup means you can always recover.

Frequently asked questions

How often should I back up my WordPress database?

It depends on how often your content changes. For a weekly blog, once a week is fine. For an e-commerce site with daily orders, back up daily. General rule: the more dynamic your site, the more frequent the backups.

Can I restore a database backup to a different WordPress site?

Yes, but only if you also change the site URL in the database. Tables store URLs in several places. Use a search-and-replace tool or plugin (like Better Search Replace) to update old URLs to the new domain. Otherwise, links and images will break.

What’s the difference between a database backup and a full site backup?

A database backup only saves your content and settings (posts, pages, comments, options). A full site backup includes database plus files (themes, plugins, uploads, and core files). For a complete restore, you need both, though many backup plugins handle both together.

My phpMyAdmin export is huge and times out. What can I do?

Use the “Custom” export method and choose “gzip compressed” to reduce file size. You can also split the export by tables. Alternatively, use a command-line mysqldump via SSH, which handles large databases without timeouts.

Where should I store my database backups?

Store backups in at least two off-site locations. Good options: cloud storage like Google Drive or Dropbox, an external hard drive, or a remote FTP server. Never rely solely on backups stored on your web server — a server crash would destroy them.

1 thought on “Beginner’s Guide to WordPress Database Backup”

Leave a Comment