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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

The safest way to export a WordPress database is to create a complete SQL dump with phpMyAdmin, WP-CLI, or mysqldump, then store it outside the publicly served website directory alongside a backup of your WordPress files. The SQL contains database-held content and settings—such as posts, pages, comments, and options—but it does not contain themes, plugins, uploads, or wp-config.php. Those files must be backed up separately.

What a WordPress database export contains

A WordPress database export is a copy of the tables stored in MySQL or MariaDB. A full SQL export normally includes the information WordPress reads from those tables, including:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Posts and pages
  • Comments
  • Site settings and other options
  • Users, terms, and other database records created by WordPress or its plugins

The export is not a complete copy of the site. WordPress files live on the server’s filesystem, not in the database.

  • Not included: themes, plugins, media uploads, core files, and wp-config.php.
  • Required for a full recovery: the SQL dump plus a matching copy of the WordPress files.

The WordPress.org Advanced Administration Handbook says it is “strongly recommended that you backup your database at regular intervals and before an upgrade.” Make an export before WordPress core, theme, plugin, PHP, or database work, and keep routine copies as part of your backup schedule.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.

Choose the right export method

Use the method that matches the access you have and the size of the database. The methods below create different kinds of output, so choose deliberately.

Method Access needed Best fit Output and repeatability
phpMyAdmin Web access to phpMyAdmin through the server or hosting control panel A straightforward full export and occasional manual downloads SQL file; convenient for a one-time export, with Quick and Custom modes
WP-CLI SSH or another shell with WP-CLI installed, run from the WordPress installation directory Repeatable exports and sites where command-line access is available SQL file created by the wp db export command; suitable for scripting
mysqldump Shell access and MySQL or MariaDB credentials Large databases or cases where a browser-based export cannot complete SQL file, optionally compressed with gzip; easy to automate
wp export WP-CLI Moving selected WordPress content rather than backing up the database WXR content file; it is not a complete SQL database backup

For a normal full backup, use phpMyAdmin, wp db export, or mysqldump. Use wp export only when you specifically need a WordPress content-transfer file.

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

Before you export

Identify the correct database

A WordPress installation can have several databases on the same server. The database name is commonly recorded as the DB_NAME value in the site’s wp-config.php. Check that value before exporting; selecting another database can produce a valid-looking SQL file that belongs to a different site.

Decide whether you need a full or selective dump

A full export is the normal choice for backup and restoration. WP-CLI and mysqldump also support selective exports when you have a specific migration or diagnostic reason. Selective dumps are easier to make smaller, but omitting a table can leave a site incomplete when you try to restore it.

Prepare a safe destination

Plan where the downloaded file will live before starting. SQL dumps can contain site configuration, user records, comments, and other private data. After downloading or creating the file, move it out of any publicly served web directory. Keep the database dump with the corresponding WordPress file backup so the two parts remain a coherent recovery set.

Method 1: Export with phpMyAdmin

phpMyAdmin is the visual workflow available through many hosting control panels and server installations. It is usually the simplest option when you do not have shell access.

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

Step 1: Open phpMyAdmin

Log in to phpMyAdmin on the server or through your hosting control panel. If your host presents several database tools, open the one connected to the MySQL or MariaDB server used by WordPress.

Step 2: Select the WordPress database

In the left pane, select the database whose name matches DB_NAME in wp-config.php. Do not select an individual table when you intend to make a complete backup; select the database itself.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Step 3: Open the Export tab

With the database selected, open Export. phpMyAdmin presents at least two export modes:

  • Quick: the straightforward full-database workflow.
  • Custom: controls table selection, compression, and other export behavior.

Step 4: Create a Quick export

  1. Keep Quick selected.
  2. Click Go.
  3. When the browser prompts you, save the downloaded SQL file to a private location.

This is the documented handbook workflow for a normal full export. Keep the original filename or rename it with a date that makes the backup easy to identify, such as wordpress-backup-2026-10-15.sql.

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

Step 5: Use Custom only when you have a reason

Choose Custom when you must change which tables are exported, select compression, or alter another export option. Record the choices you make. A custom export that excludes tables is not equivalent to a full site backup, and the missing tables may be required during restoration.

When phpMyAdmin is the wrong tool

Browser-based tools can be inconvenient for very large databases. A long-running export may hit hosting time limits, a proxy limit, or a browser interruption. If the export repeatedly fails or never produces a complete download, use WP-CLI or mysqldump over a shell instead.

Method 2: Export with WP-CLI

WP-CLI is the practical choice when you have SSH access and want a command that can be repeated or placed in a backup script. Run it from the WordPress installation directory so WP-CLI can find the site’s configuration.

Step 1: Change to the WordPress directory

Open an SSH session or local shell on the server and change to the directory containing the WordPress installation and wp-config.php.

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

Step 2: Run the export command

wp db export backup.sql

WP-CLI reads the database credentials from wp-config.php, invokes mysqldump, and writes the SQL dump to backup.sql. The filename can include a path if you want the output written to a specific private backup directory.

Step 3: Know the alias

The following command is an alias for the same export operation:

Rank #3
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
wp db dump backup.sql

Use whichever spelling fits your existing scripts, but do not confuse either command with wp export; the latter creates a WXR content file rather than a complete SQL dump.

Step 4: Restrict or exclude tables only when necessary

WP-CLI accepts valid mysqldump flags. To export only selected tables, use:

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.
wp db export backup.sql --tables=table1,table2

To omit selected tables, use:

wp db export backup.sql --exclude_tables=table1,table2

Replace the example names with actual table names. A restricted dump is appropriate for a targeted migration or investigation, not as the sole backup of a working site unless you have confirmed that every required table is elsewhere in your recovery plan.

Step 5: Verify the file and move it off the web root

Inspect the resulting file, record its location, and make sure it has a nonzero size before moving it to your private backup storage. Do not leave backup.sql in a directory that the web server can deliver directly to visitors. Keep the SQL file with the matching WordPress files backup.

Method 3: Export with mysqldump

Use the MySQL or MariaDB command line when you have shell access but do not want to use WP-CLI, or when a browser export is unreliable for a large database.

Step 1: Run the standard command

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

Substitute the host, database user, and database name used by the site. The -p option causes the client to prompt for the password instead of placing it in the command line. The --add-drop-table option places drop-table statements in the dump, which is useful when the SQL is later imported into an existing database.

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.

Step 2: Enter the password at the prompt

When prompted, enter the database user’s password. If authentication fails, recheck the values in wp-config.php, including the host name, user, password, and database name. A successful shell connection is required before the dump can be written.

Step 3: Compress a large dump when appropriate

The handbook also documents streaming the dump through gzip:

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
mysqldump --add-drop-table -h DB_HOST -u DB_USER -p DB_NAME | gzip > wordpress-backup.sql.gz

This creates a compressed SQL archive instead of an uncompressed .sql file. Keep the compressed file in private storage and make sure the person or process responsible for restoration knows it must be decompressed before, or as part of, the import process.

Step 4: Check the output

Confirm that the command completed without an error, that the output file exists, and that its location is recorded. Treat an interrupted command or an empty file as a failed backup rather than assuming the export is usable.

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

Do not confuse an SQL backup with a WXR content export

WordPress has another command named wp export. It creates a WXR file containing authors, terms, posts, comments, and attachment references. WXR is designed for transferring WordPress content; it does not include the site configuration or the attachment files themselves.

Characteristic SQL database export WXR from wp export
Primary purpose Database backup and restoration WordPress content transfer
Includes database settings Yes, as database-held records No site configuration
Includes attachment files No; files require a separate backup No; it contains attachment references
Typical use Recovering or cloning the database Moving authors, terms, posts, and comments between WordPress sites

If your goal is to recover the site after a failure or upgrade, choose an SQL export and back up the WordPress files as well. A WXR file alone cannot restore themes, plugins, uploads, or wp-config.php.

How to verify and store the export

Check that an export was actually created

  • Confirm that the download or command completed without an error message.
  • Verify that the expected .sql or .sql.gz file exists.
  • Record the full path or storage location.
  • Keep the file out of the public web directory.

A file’s existence does not prove that it contains the intended site. Confirm the database selection before exporting and use a filename that identifies the site and date.

Store a coherent backup set

Store the database export together with the WordPress file backup made for the same recovery point. The SQL restores database-held content and settings; the file backup restores themes, plugins, uploads, core files, and wp-config.php. Keeping only one side leaves the recovery incomplete.

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

Protect the data

Database dumps can contain private site information. Limit access to the backup location, avoid sharing the file through a public URL, and remove temporary copies from publicly served directories as soon as the transfer is complete.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Restoration context: what the SQL file can and cannot do

Restoring an SQL export means importing it into a MySQL or MariaDB database. The SQL file can recreate the database records captured at export time, but it cannot recreate files that were never in the database.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
  • Import the SQL into the intended MySQL or MariaDB database.
  • Use the matching WordPress files backup for themes, plugins, uploads, core files, and wp-config.php.
  • Do not treat a database-only restore as a complete site restore.

Before an upgrade or other high-risk change, create both parts of the backup set. Afterward, retain the export long enough to recover if the change causes a problem.

WordPress.com considerations

On WordPress.com, direct database access is described as an advanced task. WordPress.com documents phpMyAdmin and WP-CLI access, and says a database copy may be downloadable from the site’s available backups. The exact option depends on the site and its available access, so check the backup area and platform documentation rather than assuming that a self-hosted control-panel workflow is available.

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

Troubleshooting common export problems

The database name is unclear

Open the site’s wp-config.php and look for DB_NAME. Use that exact value in phpMyAdmin or the command-line export. If several WordPress installations share a server, also verify that the selected tables belong to the intended site.

phpMyAdmin does not finish

For a large database or a browser timeout, switch to WP-CLI or mysqldump over SSH. The command-line methods avoid the browser download workflow and can write the dump directly to server storage, with optional gzip compression.

WP-CLI reports a credentials or connection error

Run the command from the directory containing the correct wp-config.php. Check the database host, name, user, and password in that file, and confirm that the shell account can run WP-CLI and access the database client.

The SQL file is missing or empty

Check the command’s final output, current directory, and destination path. An interrupted export, a failed authentication attempt, or a write-permission problem can leave no usable dump. Re-run the export to a location where the account can write, then verify the resulting file before deleting the failed copy.

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

You exported WXR by mistake

A WXR file is a content-transfer file, not a database dump. If you need a full backup, run wp db export, use phpMyAdmin’s database-level Export tab, or run mysqldump, and back up the WordPress files separately.

A repeatable backup routine

  1. Identify the site’s DB_NAME and confirm which WordPress installation you are backing up.
  2. Choose phpMyAdmin for a simple manual export, or WP-CLI/mysqldump for repeatable and large-database work.
  3. Create a full SQL dump unless you have a documented reason to include or exclude specific tables.
  4. Check that the file exists, completed without errors, and has a recorded location.
  5. Move the dump out of the public web directory and restrict access to it.
  6. Store it with the matching WordPress files backup.
  7. Keep regular copies and make an additional export before upgrades or other major changes.

This process gives you a database backup that can be imported into MySQL or MariaDB while preserving the distinction between database records and the WordPress files required for a complete site recovery.

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.