How to Back Up Your WordPress or Next.js Site Before Making Big Changes
Create reliable, restorable backups of your WordPress database and files—or Next.js code and CMS data—before updating plugins, themes, or dependencies.
A routine WordPress plugin update or a major npm dependency bump can turn a live business site into a blank white screen right before a busy weekend campaign. Relying blindly on your hosting company's "auto backup" is risky unless you know how to download and restore it yourself. Taking a ten-minute manual snapshot before major edits saves hours of panic.
Back Up WordPress: Files Plus Database
A WordPress site lives in two places: your files (wp-content, themes, uploads) and your MySQL/MariaDB database (posts, pages, WooCommerce orders, settings). Backing up only one leaves you stuck.
- Plugin method (quickest): Install UpdraftPlus or WPVivid Backup, run an immediate Backup Now (both Files and Database), and download the
.zipand.sql.gzarchives to your laptop or Google Drive—never leave the only copy sitting on the same server. - Control panel method: In cPanel or DirectAdmin, compress
public_htmlvia File Manager and export your database as.sqlusing phpMyAdmin. - Pro tip: Clear cache plugins before exporting so backup archives stay smaller and cleaner.
Back Up Next.js and Modern Static Sites
Modern React and Next.js sites are stateless in code, meaning Git already versions your codebase—but content, environment secrets, and databases still need separate care.
- Run
git statusand commit or tag your working state (git tag pre-upgrade-2026-04) and push to GitHub or GitLab. - Back up your
.env.local/ production environment variables securely in a password manager like Bitwarden or 1Password (never commit.envto Git). - Export external data: take a snapshot of your Postgres/Supabase/MongoDB database (
pg_dump) and download any uploaded user assets from S3, Cloudflare R2, or Cloudinary.
Verify That Your Backup Actually Restores
An untested backup is just wishful thinking.
| Platform | Quick Verification Check |
|---|---|
| WordPress | Check that .sql file is non-empty and wp-content/uploads is complete |
| Next.js | Confirm vercel rollback or previous Cloudflare Pages deployment is intact |
| Database | Test restoring the dump onto a local staging instance once a quarter |
Once your backup sits safely off-server, make your theme, plugin, or framework upgrades with complete peace of mind.