{"id":34653,"date":"2021-12-29T18:24:40","date_gmt":"2021-12-29T18:24:40","guid":{"rendered":"https:\/\/www.hostduplex.com\/kb\/?post_type=ht_kb&#038;p=34653"},"modified":"2021-12-29T18:26:03","modified_gmt":"2021-12-29T18:26:03","slug":"how-to-repair-wordpress-database","status":"publish","type":"ht_kb","link":"https:\/\/www.hostduplex.com\/kb\/article\/how-to-repair-wordpress-database\/","title":{"rendered":"How to repair WordPress Database"},"content":{"rendered":"\n<p>This article will show you how to repair a WordPress database using WP_ALLOW_REPAIR. This will instruct WordPress to fix any issue by adding a line in your wp-config.php file.<\/p>\n\n\n\n<p>Firstly, you need to open your wp-config.php file. It can normally be found in the root folder for your domain.<\/p>\n\n\n\n<p>Once open, look for the following line:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/* That's all, stop editing! Happy blogging. *\/<\/pre>\n\n\n\n<p>Add this line immediately above that line:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">define ('WP_ALLOW_REPAIR', true);<\/pre>\n\n\n\n<p>Now, save your wp-config.php file and close it.<\/p>\n\n\n\n<p>Now go to <strong>http:\/\/yourdomain.com\/wp-admin\/maint\/repair.php<\/strong>. This will take you to the database repair page where you&#8217;ll be able to repair the database, or repair and optimize the database. Click on your preferred option and wait for WordPress to finish the process.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\" id=\"attachment_66647\"><img decoding=\"async\" src=\"https:\/\/www.hostduplex.com\/kb\/wp-content\/uploads\/2021\/12\/Database-repair-page.jpg\" alt=\"\"\/><figcaption>Database repair page<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-danger\"> Once you\u2019re finished,&nbsp;remove&nbsp;the line that you just added to your wp-config.php file. This page is not password protected.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-background has-purple-background-color has-purple-color\"\/>\n\n\n\n<p>If you are a Host Duplex customer and still have questions, please open a ticket in the&nbsp;<a href=\"https:\/\/secure.hostduplex.com\/clientarea.php\" target=\"_blank\" rel=\"noopener\">Host Duplex client portal.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article will show you how to repair a WordPress database using WP_ALLOW_REPAIR. This will instruct WordPress to fix any issue by adding a line in your wp-config.php file. Firstly, you need to open your wp-config.php file. It can normally be found in the root folder for your domain. Once&#8230;<\/p>\n","protected":false},"author":2,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"ht-kb-category":[163],"ht-kb-tag":[239,240,241],"class_list":["post-34653","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-wordpress","ht_kb_tag-repair-database","ht_kb_tag-wordpress-database","ht_kb_tag-wp-config"],"_links":{"self":[{"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/ht-kb\/34653","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/comments?post=34653"}],"version-history":[{"count":5,"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/ht-kb\/34653\/revisions"}],"predecessor-version":[{"id":34667,"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/ht-kb\/34653\/revisions\/34667"}],"wp:attachment":[{"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/media?parent=34653"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/ht-kb-category?post=34653"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/ht-kb-tag?post=34653"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}