{"id":9692,"date":"2009-10-05T21:06:07","date_gmt":"2009-10-05T15:36:07","guid":{"rendered":"https:\/\/www.quickonlinetips.com\/archives\/?p=9692"},"modified":"2026-10-13T13:37:34","modified_gmt":"2026-10-13T08:07:34","slug":"backup-restore-wordpress-database","status":"publish","type":"post","link":"https:\/\/www.quickonlinetips.com\/archives\/2009\/10\/backup-restore-wordpress-database\/","title":{"rendered":"How to Backup and Restore WordPress Database (2026 Guide)"},"content":{"rendered":"<p>How do you backup and restore WordPress database tables when something breaks? Your database holds every post, page, comment, setting and user, so a healthy copy can be the only way back after a bad plugin update, a hack or a mistake. The original author of this guide once broke his blog&#8217;s <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2020\/02\/change-wordpress-permalinks-structure\/\">permalink structure<\/a> and was saved by the previous day&#8217;s backup. Here is how to <strong>backup and restore WordPress database<\/strong> files in 2026.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-large wp-image-64130\" src=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/backup-restore-wordpress-database-1024x538.webp\" alt=\"Backup and restore WordPress database\" width=\"1024\" height=\"538\" srcset=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/backup-restore-wordpress-database-1024x538.webp 1024w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/backup-restore-wordpress-database-300x158.webp 300w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/backup-restore-wordpress-database-150x79.webp 150w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/backup-restore-wordpress-database-768x403.webp 768w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/backup-restore-wordpress-database.webp 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p><strong>Quick answer:<\/strong> For backups, use a plugin such as UpdraftPlus on a daily schedule with remote storage, or export the database in phpMyAdmin (Export &gt; Quick &gt; SQL). To restore, use the plugin&#8217;s Restore button, or in phpMyAdmin select the database, drop the old tables and Import the .sql file. Then clear your cache and check the site.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_89 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6ad931ccee0bf\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #1a202c;color:#1a202c\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #1a202c;color:#1a202c\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6ad931ccee0bf\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/10\/backup-restore-wordpress-database\/#Files_vs_database_what_needs_backing_up\" >Files vs database: what needs backing up?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/10\/backup-restore-wordpress-database\/#How_to_back_up_your_WordPress_database\" >How to back up your WordPress database<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/10\/backup-restore-wordpress-database\/#Method_1_A_backup_plugin_easiest\" >Method 1: A backup plugin (easiest)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/10\/backup-restore-wordpress-database\/#Method_2_phpMyAdmin_export\" >Method 2: phpMyAdmin export<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/10\/backup-restore-wordpress-database\/#Method_3_WP-CLI\" >Method 3: WP-CLI<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/10\/backup-restore-wordpress-database\/#Method_4_Your_hosts_backups\" >Method 4: Your host&#8217;s backups<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/10\/backup-restore-wordpress-database\/#How_to_restore_your_WordPress_database\" >How to restore your WordPress database<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/10\/backup-restore-wordpress-database\/#With_a_backup_plugin\" >With a backup plugin<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/10\/backup-restore-wordpress-database\/#With_phpMyAdmin\" >With phpMyAdmin<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/10\/backup-restore-wordpress-database\/#With_WP-CLI\" >With WP-CLI<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/10\/backup-restore-wordpress-database\/#Tips_for_safe_restores\" >Tips for safe restores<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/10\/backup-restore-wordpress-database\/#FAQ\" >FAQ<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/10\/backup-restore-wordpress-database\/#How_often_should_I_back_up_my_WordPress_database\" >How often should I back up my WordPress database?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/10\/backup-restore-wordpress-database\/#Will_restoring_the_database_delete_new_posts\" >Will restoring the database delete new posts?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/10\/backup-restore-wordpress-database\/#Does_a_database_backup_include_images\" >Does a database backup include images?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Files_vs_database_what_needs_backing_up\"><\/span>Files vs database: what needs backing up?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><strong>Database:<\/strong> posts, pages, comments, users, settings and plugin data. Changes daily.<\/li>\n<li><strong>Files:<\/strong> <code>wp-content<\/code> (uploads, themes, plugins) and <code>wp-config.php<\/code>. Back these up too, but less often.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"How_to_back_up_your_WordPress_database\"><\/span>How to back up your WordPress database<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Method_1_A_backup_plugin_easiest\"><\/span>Method 1: A backup plugin (easiest)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li><strong><a href=\"https:\/\/updraftplus.com\/\" target=\"_blank\" rel=\"noopener\">UpdraftPlus<\/a><\/strong>: free scheduled backups of database and files to Google Drive, Dropbox, S3 and more, with one-click restore.<\/li>\n<li><strong><a href=\"https:\/\/jetpack.com\/\" target=\"_blank\" rel=\"noopener\">Jetpack VaultPress Backup<\/a><\/strong>: paid real-time backups with restores from the WordPress.com dashboard.<\/li>\n<li><strong>WP-DB-Backup<\/strong>: the simple database-only plugin this post first recommended. It still works for quick SQL downloads, but a full backup plugin is safer.<\/li>\n<\/ul>\n<p>Set the database to back up daily and keep at least two weeks of copies off the server. See also the best <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2011\/05\/best-dropbox-wordpress-plugins\/\">Dropbox WordPress plugins for backups<\/a>.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Method_2_phpMyAdmin_export\"><\/span>Method 2: phpMyAdmin export<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li>Open phpMyAdmin from cPanel or hPanel.<\/li>\n<li>Select your WordPress database (its name is in <code>wp-config.php<\/code> as <code>DB_NAME<\/code>).<\/li>\n<li>Click <strong>Export<\/strong>, choose <strong>Quick<\/strong> and format <strong>SQL<\/strong>, then <strong>Export<\/strong>. Save the .sql file.<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"Method_3_WP-CLI\"><\/span>Method 3: WP-CLI<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code>wp db export backup-2026-10-12.sql<\/code><\/pre>\n<p>This writes a full SQL dump in the WordPress folder; download it and delete it from the server. Here&#8217;s how to <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/06\/daily-backup-wordpress-blog-mysql-database\/\">schedule a daily WordPress database backup<\/a>.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Method_4_Your_hosts_backups\"><\/span>Method 4: Your host&#8217;s backups<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Most hosts keep daily or weekly backups you can download or restore from the control panel. Useful, but keep your own copy too. Learn how to <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2015\/02\/backup-websites-on-hosting-server\/\">back up websites on your hosting server<\/a>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_to_restore_your_WordPress_database\"><\/span>How to restore your WordPress database<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"With_a_backup_plugin\"><\/span>With a backup plugin<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>In UpdraftPlus, open <strong>Settings &gt; UpdraftPlus Backups<\/strong>, pick the backup date, tick <strong>Database<\/strong> and click <strong>Restore<\/strong>. If the dashboard is broken, install a fresh WordPress, add the plugin, upload the backup files and restore from there.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"With_phpMyAdmin\"><\/span>With phpMyAdmin<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li>Take a backup of the current, broken database first, just in case.<\/li>\n<li>Select your WordPress database, tick <strong>Check all<\/strong> and choose <strong>Drop<\/strong> to remove the damaged tables. This deletes them permanently.<\/li>\n<li>Click <strong>Import<\/strong>, choose your .sql file and click <strong>Import<\/strong> (or Go). Large files may need your host&#8217;s help or the zip format.<\/li>\n<li>Clear your cache plugin, CDN and the <code>wp-content\/cache<\/code> folder.<\/li>\n<li>Log in and check posts, settings and permalinks.<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"With_WP-CLI\"><\/span>With WP-CLI<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code>wp db import backup-2026-10-12.sql\nwp cache flush<\/code><\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Tips_for_safe_restores\"><\/span>Tips for safe restores<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>Restore to a staging site first if your host offers one.<\/li>\n<li>Check the table prefix in the backup matches <code>$table_prefix<\/code> in <code>wp-config.php<\/code>.<\/li>\n<li>If you moved domains, use a search-replace tool so old URLs are updated, never a plain text edit of serialized data.<\/li>\n<li>Keep the database tidy afterwards: here&#8217;s how to <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2011\/06\/optimize-wordpress-database\/\">optimize your WordPress database<\/a>.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"FAQ\"><\/span>FAQ<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"How_often_should_I_back_up_my_WordPress_database\"><\/span>How often should I back up my WordPress database?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Daily for active blogs, and always before updating WordPress, themes or plugins.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Will_restoring_the_database_delete_new_posts\"><\/span>Will restoring the database delete new posts?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Yes. Anything added after the backup date is lost, so export recent posts first if you need them.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Does_a_database_backup_include_images\"><\/span>Does a database backup include images?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>No. Images live in <code>wp-content\/uploads<\/code>; back up files separately.<\/p>\n<p><em>Originally written by guest author Udegbunam Chukwudi, who shared blogging and make-money-online tips on StrictlyOnlineBiz. Updated for 2026 by QuickOnlineTips.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How do you backup and restore WordPress database tables when something breaks? Your database holds every post, page, comment, setting&#8230;<\/p>\n","protected":false},"author":4,"featured_media":64130,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[6,25],"tags":[44,49,17],"class_list":["post-9692","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogging","category-domain-hosting","tag-guest-posts","tag-tutorials","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/9692","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/comments?post=9692"}],"version-history":[{"count":3,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/9692\/revisions"}],"predecessor-version":[{"id":65310,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/9692\/revisions\/65310"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media\/64130"}],"wp:attachment":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media?parent=9692"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/categories?post=9692"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/tags?post=9692"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}