tutorialWordPressExportBackup

How to Export WordPress Site: Complete Backup & Migration Guide

How to Export WordPress Site: Complete Backup & Migration Guide

Whether you're backing up your site, migrating to new hosting, or moving away from WordPress entirely, knowing how to properly export your WordPress site is essential.

This comprehensive guide covers every method and ensures you don't miss anything.


What You Need to Export

A complete WordPress export includes:

ComponentContainsExport Method
DatabasePosts, pages, comments, settingsphpMyAdmin, CLI, or plugin
Media filesImages, videos, PDFs, uploadsFTP/SFTP or file manager
ThemesTheme files and customizationsFTP or theme export
PluginsPlugin files (not settings)FTP or note plugin list
wp-config.phpDatabase credentials, settingsFTP
Custom codefunctions.php edits, child themesFTP

Most people focus only on content, missing critical pieces like theme settings or customizations.


Method 1: WordPress Built-in Export (Content Only)

The simplest method for basic content export.

Step-by-Step

1. Log into WordPress admin

2. Go to Tools → Export

3. Choose what to export:

- All content

- Posts only

- Pages only

- Media only

4. Click Download Export File

What This Creates

An XML file (WXR format) containing:

  • ✅ Posts and pages
  • ✅ Comments
  • ✅ Categories and tags
  • ✅ Authors
  • ✅ Media URLs (not files)

What's Missing

  • ❌ Actual media files (only links)
  • ❌ Theme files and settings
  • ❌ Plugin settings
  • ❌ Widget configurations
  • ❌ Customizer settings
  • ❌ Menu structures

Use case: Basic content backup or migration between WordPress sites with matching themes.


Method 2: Full Database Export (phpMyAdmin)

For a complete database backup including all settings.

Step-by-Step

1. Log into your hosting control panel (cPanel, Plesk, etc.)

2. Open phpMyAdmin

3. Select your WordPress database (usually named like wp_sitename)

4. Click Export tab

5. Choose format: SQL

6. Click Export

What This Creates

A .sql file containing:

  • ✅ All posts, pages, comments
  • ✅ All WordPress settings
  • ✅ User accounts
  • ✅ Plugin settings stored in database
  • ✅ Widget configurations
  • ✅ Menu structures

What's Missing

  • ❌ Media files
  • ❌ Theme files
  • ❌ Plugin files (just settings)
  • ❌ wp-config.php

Method 3: Complete File Export (FTP/SFTP)

For a full backup including all files.

What to Download

Connect via FTP/SFTP and download:

/public_html/  (or /www/, /htdocs/)

├── wp-content/

│ ├── themes/ ← Your theme files

│ ├── plugins/ ← All plugins

│ ├── uploads/ ← All media files

│ └── languages/ ← Translation files

├── wp-config.php ← Critical settings

└── .htaccess ← Server configuration

How to Download

Using FileZilla:

1. Connect to your server

2. Navigate to WordPress installation

3. Right-click wp-content → Download

4. Also download wp-config.php and .htaccess

Using SSH:

Create tarball of entire WordPress installation

tar -czvf backup.tar.gz /path/to/wordpress/

Or just wp-content

tar -czvf wp-content-backup.tar.gz /path/to/wordpress/wp-content/


Method 4: Plugin-Based Backup (Most Comprehensive)

Backup plugins combine all methods into one.

Recommended Plugins

PluginFree FeaturesPro Features
UpdraftPlusFull backup, cloud storageIncremental, multisite
DuplicatorSite cloning, migrationPro features less needed
All-in-One WP MigrationEasy exportLarge file handling
BackWPupDatabase + filesMore destinations

Using UpdraftPlus (Example)

1. Install and activate UpdraftPlus

2. Go to Settings → UpdraftPlus Backups

3. Click Backup Now

4. Check both Database and Files

5. Click Backup Now

6. Download all backup parts when complete

What You Get

  • ✅ Database backup
  • ✅ Plugins backup
  • ✅ Themes backup
  • ✅ Uploads backup
  • ✅ (wp-content)/other backup

Recommendation: This is the easiest method for complete backups.


Method 5: Command Line (WP-CLI)

For developers and those with SSH access.

Export Database

Export database

wp db export backup.sql

Export with gzip compression

wp db export - | gzip > backup.sql.gz

Export Content

Export all content to WXR

wp export --dir=./exports/

Export only specific post type

wp export --post_type=post --dir=./exports/

Create Full Backup

Create full backup script

#!/bin/bash

DATE=$(date +%Y%m%d)

BACKUP_DIR="./backups/$DATE"

mkdir -p $BACKUP_DIR

Export database

wp db export $BACKUP_DIR/database.sql

Package files

tar -czvf $BACKUP_DIR/files.tar.gz wp-content/ wp-config.php .htaccess

echo "Backup complete: $BACKUP_DIR"


Exporting for Migration to Modern Platforms

If you're moving away from WordPress, here's what to export and how to use it.

Migration to Next.js/Astro/Static Sites

What matters:

  • ✅ Content (posts, pages)
  • ✅ Media files
  • ✅ SEO metadata (if you have Yoast/Rank Math)

Best approach:

1. Use our free migration tool at LeaveWP

2. Connect your WordPress site

3. We extract:

- Posts → MDX files with frontmatter

- Pages → MDX files

- Media → Optimized images

- SEO → Frontmatter metadata

Start free migration →

What You Don't Need

When migrating to static sites, you can ignore:

  • Plugin files (won't work on new platform)
  • Theme files (rebuilding design anyway)
  • Database export (content extracted differently)
  • Most wp-config.php settings

Special Considerations

Exporting Custom Post Types

Built-in export doesn't always include custom post types. Options:

1. Use WP All Export plugin (can export any post type)

2. Use WP-CLI: wp export --post_type=my_custom_type

3. Query database directly via phpMyAdmin

Exporting WooCommerce

WooCommerce has extra data:

  • Products (with variations)
  • Orders
  • Customers
  • Coupons

Recommended: Use WooCommerce's built-in CSV export or All Export Pro.

Exporting ACF/Custom Fields

Advanced Custom Fields data lives in:

  • Database (postmeta table)
  • Field group definitions (JSON or database)

Export field groups: ACF → Tools → Export Field Groups (creates JSON)

Exporting Multisite

Each site needs separate export:

1. Run exports from each subsite's admin

2. Or use WP-CLI with --url= parameter


Verification Checklist

Before considering your export complete:

Database

  • [ ] Exported .sql file exists
  • [ ] File size seems reasonable (not 0KB)
  • [ ] Can be imported to test database

Media Files

  • [ ] wp-content/uploads/ folder downloaded
  • [ ] Folder size matches hosting file manager
  • [ ] Spot-check images open correctly

Themes

  • [ ] Active theme folder downloaded
  • [ ] Child theme included (if using)
  • [ ] Theme customizer settings exported (if possible)

Plugins

  • [ ] Plugin list documented
  • [ ] Plugin settings exported where possible
  • [ ] Premium plugin licenses noted

Other

  • [ ] wp-config.php backed up
  • [ ] .htaccess backed up
  • [ ] Custom code documented

Storage & Security

Where to Store Backups

LocationProsCons
Cloud Storage (Google Drive, Dropbox)Off-site, reliableDepend on service
Local ComputerImmediate accessRisk of hardware failure
External Hard DriveOffline backupCan be lost/damaged
Another ServerAutomated, off-siteAdditional cost

Best practice: Multiple locations. At minimum: cloud + local.

Security

  • ✅ Encrypt backups containing user data
  • ✅ Use secure transfer methods (SFTP, not FTP)
  • ✅ Don't share backup URLs publicly
  • ✅ Remove old backups periodically
  • ✅ Test restores periodically

Automating Backups

Don't rely on manual exports. Set up automated backups:

With UpdraftPlus

1. Settings → UpdraftPlus

2. Set schedule (e.g., Daily database, Weekly files)

3. Configure remote storage (Google Drive, Dropbox, S3)

4. Save and test

With Hosting

Many hosts offer automatic backups:

  • WP Engine: Daily automated
  • Kinsta: Daily automated
  • SiteGround: Daily automated
  • Cloudways: On-demand + scheduled

With External Services

  • BlogVault
  • VaultPress (Jetpack)
  • ManageWP

What's Next After Exporting?

If Migrating to New WordPress Host

1. Set up WordPress on new host

2. Import database via phpMyAdmin

3. Upload wp-content folder

4. Update wp-config.php with new database credentials

5. Update site URL in database if domain changed

If Migrating Away from WordPress

1. Use our tool to convert contentLeaveWP

2. Content becomes MDX/Markdown files

3. Build new site with Next.js, Astro, or similar

4. Deploy to Vercel, Netlify, or Cloudflare

Start your migration →


FAQ

Q: How long do exports take?

Depends on site size. Small sites: under 1 minute. Large sites with many images: 10-30 minutes.

Q: Can I export without admin access?

You need at least database access (phpMyAdmin) and FTP access. Without any access, contact your host.

Q: What about my SEO rankings after migration?

Maintain the same URL structure and implement 301 redirects for any changed URLs. Rankings should transfer. See our SEO migration checklist →

Q: Should I export before updating WordPress?

Yes! Always backup before major updates, theme changes, or plugin installations.

Q: What are the best alternatives to WordPress?

Next.js, Astro, and static site generators are popular choices.


Conclusion

A complete WordPress export includes:

1. Database (all content and settings)

2. Media files (uploads folder)

3. Themes (active and child)

4. wp-config.php (critical settings)

5. Plugin list (for reinstallation)

For most users, UpdraftPlus or similar backup plugins are the easiest solution for complete exports.

For migration away from WordPress, use our free tool to convert your content to modern formats automatically.

Related guides:

Export and migrate for free →

Share:

Related Articles

View all

Ready to Migrate Your WordPress Site?

Use our free tool to export your WordPress content in minutes.

Start Free Migration