Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk11 min

How to Export a WordPress Database Step by Step

Learn how to export a WordPress database using phpMyAdmin, WP-CLI or mysqldump, what the SQL file includes, how to verify it and why a separate file backup is essential.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The safest way to export a WordPress database is to create a complete SQL dump before an upgrade, migration, or major repair. Use phpMyAdmin when you have hosting-panel access, wp db export when you have SSH and WP-CLI, or mysqldump when you need command-line control or must handle a large database. Save the dump outside the public web directory and keep it with a separate backup of your WordPress files.

What a WordPress database export contains

A WordPress database export is a copy of information stored in MySQL or MariaDB. It normally covers posts, pages, comments, users, categories, tags, menus, plugin data, theme settings, and other site configuration held in database tables. The result is usually an SQL file that can be imported into a compatible database.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The export is not a complete copy of the WordPress installation. Themes, plugins, uploaded media, other files in wp-content, and wp-config.php are stored on the filesystem and must be backed up separately. A database dump paired with the matching file backup is what makes a site-restoration set coherent.

The WordPress.org Advanced Administration Handbook says it is “strongly recommended that you backup your database at regular intervals and before an upgrade.” A database export is therefore a routine maintenance task, not only an emergency measure.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Choose the right export method

Method Access needed Best use Export scope Repeatability
phpMyAdmin Web hosting panel or server login Fast, visual one-off downloads Full SQL database when the selected database is exported Manual, menu-driven process
WP-CLI SSH or another shell with WordPress installed Scriptable exports from the WordPress directory Full SQL database by default; can include or exclude selected tables High; the command can be scheduled or scripted
mysqldump Shell access and database credentials Large databases and direct MySQL/MariaDB work Full SQL database for the database name supplied High; supports scripts and compression
wp export WP-CLI Moving content between WordPress sites WXR content export, not a complete database backup High, but intended for content transfer

For most site owners with a normal hosting control panel, phpMyAdmin is the shortest path. Choose WP-CLI or mysqldump when the database is large, phpMyAdmin times out, or you want a repeatable backup command. Do not substitute wp export for a database backup: it serves a different purpose.

Prepare before you export

Find the correct database

WordPress stores the database name in wp-config.php, in the DB_NAME value. If the hosting account contains several sites or databases, confirm this value before selecting anything in phpMyAdmin or entering a command. Exporting the wrong database can produce a perfectly valid SQL file that does not belong to the site you intend to protect.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Confirm access and storage

  • For phpMyAdmin, sign in to the hosting control panel or server interface that provides it.
  • For WP-CLI, make sure the shell opens in the WordPress installation directory and that the installation can read wp-config.php.
  • For mysqldump, have the database host, user, database name, and password available.
  • Have enough free storage for the dump and, if using compression, the compressed output file.

Choose a safe destination

Plan where the file will go before starting. A dump can contain site content, user records, configuration values, and other sensitive information. After downloading or generating it, move it to protected storage and never leave it in a publicly served web directory. Keep a copy with the corresponding WordPress files, but also keep an additional copy away from the server in case the server itself fails.

Decide whether the site should be quiet

A normal export reads the database while the site is running. For a busy site or a migration, reduce the chance of capturing a changing state by scheduling the export during a quieter period and avoiding simultaneous database-heavy maintenance. The exact maintenance approach depends on the host; the important point is to know what activity may occur while the dump is being created.

Method 1: Export with phpMyAdmin

phpMyAdmin is the visual workflow documented in the WordPress Advanced Administration Handbook. It is convenient when you can reach the database through a hosting panel and want a complete export without using a shell.

Step 1: Open phpMyAdmin

Log in to phpMyAdmin on the server or through your hosting control panel. The interface may show more than one database, especially on shared hosting.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step 2: Select the WordPress database

Use the left-hand navigation pane to select the database whose name matches DB_NAME in wp-config.php. Do not select an individual table for a normal backup; the goal is to export the database as a whole.

Step 3: Open Export

With the database selected, click the Export tab. phpMyAdmin offers Quick and Custom export methods.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

Step 4: Use Quick for a straightforward full export

Keep Quick selected when you want the standard full-database workflow. Click Go. When the browser prompts you, save the downloaded SQL file to a location you can identify later. Retain the original filename or rename it with the site name and date so several backups cannot be confused.

Step 5: Use Custom when you need control

Select Custom when you need to change table selection, compression, or other export behavior. Custom mode is useful for a targeted table export or for adjusting the output format, but check the table list carefully: omitting a table can make the resulting file unsuitable as a complete backup.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What to do if phpMyAdmin fails

  • If the download stops or the browser reports a timeout, try the command-line method instead; large databases are a common reason to move away from a browser-based export.
  • If the database list is confusing, return to wp-config.php and verify DB_NAME rather than guessing from a similar name.
  • If the file downloads with an unexpected extension, inspect it before moving it. phpMyAdmin may offer compression in Custom mode; preserve the extension so you know whether decompression is required before import.

Method 2: Export with WP-CLI

WP-CLI reads the database credentials from wp-config.php and calls mysqldump for the export. This makes it a practical option for SSH access, repeatable backups, and scripts.

Step 1: Open the WordPress directory

Connect through SSH or another shell and change to the directory containing the WordPress installation and its wp-config.php. Running the command from that directory lets WP-CLI load the intended site configuration.

Step 2: Run the full export

wp db export backup.sql

This writes the database dump to backup.sql in the current directory unless you provide a different path. The command uses the credentials in wp-config.php, so you do not need to put the password directly in the command.

Step 3: Know the alias

wp db dump backup.sql is an alias for the same export operation. Teams may encounter either form in scripts; both request a database dump rather than a WXR content export.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step 4: Limit or exclude tables only when intended

WP-CLI accepts valid mysqldump flags. Use --tables=table1,table2 to restrict the export to named tables, or --exclude_tables=... to omit selected tables. These options are useful for diagnostics or partial transfers, but a backup intended for full restoration should normally include all WordPress tables.

Step 5: Record and protect the output

Inspect the resulting file, record its location, and move it off the server. A successful command is not the end of the process: a dump left in a web-accessible directory could be downloaded by anyone who can guess its URL.

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

Method 3: Export with mysqldump

Use the MySQL or MariaDB command line when you have shell access and want direct control, especially if phpMyAdmin cannot process the database reliably.

Step 1: Run the documented command pattern

mysqldump --add-drop-table -h DB_HOST -u DB_USER -p DB_NAME > wordpress-backup.sql

Replace DB_HOST, DB_USER, and DB_NAME with the values for the site. Press Enter, then type the database password when prompted. The password is not displayed while you type it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step 2: Understand the output

The redirect operator writes the SQL stream to wordpress-backup.sql. The --add-drop-table option adds statements that remove existing tables before recreating them during a later import, which is useful when restoring into a database that already contains those tables.

Step 3: Compress a large dump

For a large database, stream the output through gzip:

mysqldump --add-drop-table -h DB_HOST -u DB_USER -p DB_NAME | gzip > wordpress-backup.sql.gz

The resulting .gz file is smaller and must be decompressed as part of the restoration workflow. Compression changes the storage format, not the database content.

Step 4: Keep credentials out of filenames and public paths

Use a protected directory for the output and avoid putting passwords in shell history or scripts. The command itself prompts for the password, which is safer than appending it visibly to the command line.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Verify the export before you rely on it

Check that the file exists and is plausible

Confirm the expected filename and location immediately after export. A zero-byte file, a file that stopped at an error, or an output saved somewhere unexpected is not a usable backup. For a compressed dump, confirm that the compression step completed and that the filename ends in .gz.

Inspect the beginning of an SQL file

Open a copy in a text editor or use a shell viewer to confirm that it contains SQL statements rather than an HTML error page. Do not edit the original while inspecting it. Large files can take time to open in a graphical editor, so a command-line preview may be more practical.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Keep database and files as one set

Label the SQL file with the site and date, then store it alongside the matching backup of themes, plugins, uploads, and configuration files. If you restore a database from one date while using files from another, plugin tables and code may no longer correspond.

Test restoration when the backup matters

The strongest verification is a test import into a separate MySQL or MariaDB database, followed by a check that the WordPress installation can read it. A file that exists is not proof that the entire recovery process will work. Test on a non-production copy so the live site is not overwritten.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Database export versus WordPress content export

WordPress has two similarly named WP-CLI operations with different results:

  • wp db export creates an SQL database dump. It is the appropriate choice for a database backup or a full database move.
  • wp export creates a WXR file containing authors, terms, posts, comments, and attachment references. WXR does not include site configuration or the attachment files themselves.

Use WXR when the goal is to transfer content into another WordPress site. Use an SQL dump when you need database tables, settings, plugin data, and the ability to restore the database as a database. Neither format, by itself, includes the WordPress files stored on the server.

What restoration requires

Restoring an SQL export means importing it into MySQL or MariaDB, then connecting the WordPress files to that database through the correct wp-config.php values. The SQL file cannot recreate themes, plugins, uploads, or the configuration file that was stored outside the database.

A practical restoration sequence

  1. Protect the current site by taking a fresh database and file backup before changing anything.
  2. Prepare the target MySQL or MariaDB database and confirm its host, user, and permissions.
  3. Import the SQL dump through phpMyAdmin or an appropriate MySQL/MariaDB command-line tool. Decompress a .gz dump first or use a workflow that can read compressed input.
  4. Place the matching WordPress files, including themes, plugins, uploads, and wp-config.php, on the target server.
  5. Check that DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST in wp-config.php point to the restored database.
  6. Open the site and administration area, then check posts, media references, menus, plugins, and key settings.

Importing only the SQL file can bring back database records while leaving the site without its themes, plugins, or media files. Conversely, copying only the files leaves the database-held content and settings absent.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Common problems and fixes

“I do not know which database to export”

Read DB_NAME in the site’s wp-config.php. On a host with multiple installations, also confirm that the file belongs to the document root you intend to back up.

phpMyAdmin times out

Switch to WP-CLI or direct mysqldump through SSH. Command-line tools avoid the browser request limits that can interrupt a long download. The compressed mysqldump form can also reduce the amount of data written to disk.

The export is missing tables

In phpMyAdmin, repeat the export with the correct database selected and use Quick for a complete export. In WP-CLI, remove restrictive --tables or --exclude_tables options unless a partial dump is intentional.

The command says the database cannot be reached

Check the host, user, database name, and password against wp-config.php. A command-line client may also require the same network access or socket settings as the web application; ask the host for the correct database host if the values are not obvious.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The dump contains an error page

This usually indicates that a web export failed or that output was redirected incorrectly. Inspect the first lines of the file, repeat the export, and use a command-line method if the browser workflow keeps returning an error response.

The backup was left in the web root

Move it immediately to protected storage and remove the publicly reachable copy. Treat SQL dumps as confidential because they can contain site and user data.

WordPress.com considerations

On WordPress.com, database access is described as an advanced task. WordPress.com documents phpMyAdmin and WP-CLI access for eligible sites and says a database copy may be downloadable from the site’s available backups. The exact controls depend on the WordPress.com plan and the access granted to the site, so use the backup area or documented access method available in that account rather than assuming a self-hosted control panel exists.

Build a repeatable backup routine

For occasional maintenance

Before an upgrade or major change, export the database with phpMyAdmin Quick, download it, label it with the site and date, and store it with the file backup. Keep the WordPress handbook’s recommendation in mind: backups should be made at regular intervals, not only immediately before upgrades.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For scheduled or scripted backups

WP-CLI and mysqldump are better foundations than a manual browser download. A script can run the chosen command, write to a dated protected directory, compress large output, and copy the result to separate storage. Test the script’s exit status and the presence of a non-empty file; an automated job that silently produces no dump is not a backup system.

For migrations

Use a full SQL export when the destination must reproduce the database, settings, and plugin data. Pair it with the site’s files and plan the import before changing DNS or taking the source site offline. Use WXR only when you intentionally want a content transfer rather than a complete clone.

Final checklist

  • Confirm the database name from DB_NAME.
  • Choose phpMyAdmin, WP-CLI, or mysqldump based on your access and database size.
  • For phpMyAdmin, select the database, open Export, keep Quick for a full export, click Go, and save the SQL file.
  • For WP-CLI, run wp db export backup.sql from the WordPress directory.
  • For a shell-only workflow, run the documented mysqldump pattern and enter the password when prompted.
  • Inspect the resulting file, record its location, and keep it out of the public web directory.
  • Store the SQL dump with the matching themes, plugins, uploads, and configuration-file backup.
  • Remember that wp export creates WXR content, not a complete database backup.
  • When recovery is important, test an import on a separate environment.

A complete WordPress backup is a matched database-and-files set. Export the database with the method that fits your access, verify the file before relying on it, and protect the dump as sensitive site data.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.