{"id":11290,"date":"2025-03-10T21:58:34","date_gmt":"2025-03-10T21:58:34","guid":{"rendered":"https:\/\/www.kadencewp.com\/help-center\/?post_type=docs&#038;p=11290"},"modified":"2025-03-12T16:51:48","modified_gmt":"2025-03-12T16:51:48","password":"","slug":"how-to-run-the-wordpress-built-in-database-repair-tool","status":"publish","type":"docs","link":"https:\/\/www.kadencewp.com\/help-center\/docs\/kadence-theme\/how-to-run-the-wordpress-built-in-database-repair-tool\/","title":{"rendered":"How to run the WordPress built-in database repair tool"},"content":{"rendered":"\n<p>If you are encountering errors related to your <strong>WordPress<\/strong> <strong>database<\/strong>, <em>WordPress<\/em> includes a built-in repair tool that can help resolve <strong><span style=\"text-decoration: underline\">database-related issues<\/span><\/strong>. This guide will walk you through enabling and using this tool for troubleshooting purposes.<\/p>\n\n\n<style>.kb-image11290_1c9b90-8b.kb-image-is-ratio-size, .kb-image11290_1c9b90-8b .kb-image-is-ratio-size{max-width:700px;width:100%;}.wp-block-kadence-column > .kt-inside-inner-col > .kb-image11290_1c9b90-8b.kb-image-is-ratio-size, .wp-block-kadence-column > .kt-inside-inner-col > .kb-image11290_1c9b90-8b .kb-image-is-ratio-size{align-self:unset;}.kb-image11290_1c9b90-8b figure{max-width:700px;}.kb-image11290_1c9b90-8b .image-is-svg, .kb-image11290_1c9b90-8b .image-is-svg img{width:100%;}.kb-image11290_1c9b90-8b .kb-image-has-overlay:after{opacity:0.3;}<\/style>\n<div class=\"wp-block-kadence-image kb-image11290_1c9b90-8b\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2560\" height=\"1309\" src=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2025\/03\/Repair-Database-scaled.jpg\" alt=\"Repair Database\" class=\"kb-img wp-image-11293\" srcset=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2025\/03\/Repair-Database-scaled.jpg 2560w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2025\/03\/Repair-Database-300x153.jpg 300w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2025\/03\/Repair-Database-1024x523.jpg 1024w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2025\/03\/Repair-Database-768x393.jpg 768w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2025\/03\/Repair-Database-1536x785.jpg 1536w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2025\/03\/Repair-Database-2048x1047.jpg 2048w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2025\/03\/Repair-Database-360x184.jpg 360w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><\/figure><\/div>\n\n\n<style>.kb-table-of-content-nav.kb-table-of-content-id11290_d68002-4d .kb-table-of-content-wrap{padding-top:var(--global-kb-spacing-sm, 1.5rem);padding-right:var(--global-kb-spacing-sm, 1.5rem);padding-bottom:var(--global-kb-spacing-sm, 1.5rem);padding-left:var(--global-kb-spacing-sm, 1.5rem);}.kb-table-of-content-nav.kb-table-of-content-id11290_d68002-4d .kb-table-of-contents-title-wrap{padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.kb-table-of-content-nav.kb-table-of-content-id11290_d68002-4d .kb-table-of-contents-title{font-weight:regular;font-style:normal;}.kb-table-of-content-nav.kb-table-of-content-id11290_d68002-4d .kb-table-of-content-wrap .kb-table-of-content-list{font-weight:regular;font-style:normal;margin-top:var(--global-kb-spacing-sm, 1.5rem);margin-right:0px;margin-bottom:0px;margin-left:0px;}<\/style>\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading11290_8a715a-3d, .wp-block-kadence-advancedheading.kt-adv-heading11290_8a715a-3d[data-kb-block=\"kb-adv-heading11290_8a715a-3d\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading11290_8a715a-3d mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading11290_8a715a-3d[data-kb-block=\"kb-adv-heading11290_8a715a-3d\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading11290_8a715a-3d img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading11290_8a715a-3d[data-kb-block=\"kb-adv-heading11290_8a715a-3d\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<p class=\"kt-adv-heading11290_8a715a-3d wp-block-kadence-advancedheading has-theme-palette-7-background-color has-background\" data-kb-block=\"kb-adv-heading11290_8a715a-3d\"><strong>Important<\/strong>: Before proceeding, it is recommended to<span style=\"text-decoration: underline\"> back up<\/span> your <strong>website<\/strong> and <strong>database<\/strong> before running this tool. While this tool is designed to repair issues safely, creating a backup ensures you can restore your site if needed. If you&#8217;re not familiar with editing a config file, it&#8217;s a good idea to reach out to your hosting provider&#8217;s support team for assistance.<\/p>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading11290_7de72b-7d, .wp-block-kadence-advancedheading.kt-adv-heading11290_7de72b-7d[data-kb-block=\"kb-adv-heading11290_7de72b-7d\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading11290_7de72b-7d mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading11290_7de72b-7d[data-kb-block=\"kb-adv-heading11290_7de72b-7d\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading11290_7de72b-7d img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading11290_7de72b-7d[data-kb-block=\"kb-adv-heading11290_7de72b-7d\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h2 class=\"kt-adv-heading11290_7de72b-7d wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading11290_7de72b-7d\">Accessing the wp-config.php file<\/h2>\n\n\n\n<p>First, you&#8217;ll need to <span style=\"text-decoration: underline\">access<\/span> your <strong>WordPress files<\/strong>. You can do this by connecting to your website via <strong>FTP<\/strong>, using your hosting provider\u2019s file manager, or browsing the files locally if you&#8217;re working in a local environment. Once you&#8217;re connected, navigate to the root directory of your WordPress installation. This is the main folder that contains essential directories like the <code>wp-content<\/code> folder and important files such as the <code>.htaccess<\/code> and <code>wp-config.php<\/code> files.<\/p>\n\n\n<style>.kb-row-layout-id11290_68cb07-a0 > .kt-row-column-wrap{align-content:start;}:where(.kb-row-layout-id11290_68cb07-a0 > .kt-row-column-wrap) > .wp-block-kadence-column{justify-content:start;}.kb-row-layout-id11290_68cb07-a0 > .kt-row-column-wrap{column-gap:var(--global-kb-gap-md, 2rem);row-gap:var(--global-kb-gap-md, 2rem);padding-top:var(--global-kb-spacing-xs, 1rem);padding-bottom:var(--global-kb-spacing-sm, 1.5rem);grid-template-columns:minmax(0, calc(30% - ((var(--global-kb-gap-md, 2rem) * 1 )\/2)))minmax(0, calc(70% - ((var(--global-kb-gap-md, 2rem) * 1 )\/2)));}.kb-row-layout-id11290_68cb07-a0 > .kt-row-layout-overlay{opacity:0.30;}@media all and (max-width: 1024px){.kb-row-layout-id11290_68cb07-a0 > .kt-row-column-wrap{grid-template-columns:repeat(2, minmax(0, 1fr));}}@media all and (max-width: 767px){.kb-row-layout-id11290_68cb07-a0 > .kt-row-column-wrap{grid-template-columns:minmax(0, 1fr);}}<\/style><div class=\"kb-row-layout-wrap kb-row-layout-id11290_68cb07-a0 alignnone wp-block-kadence-rowlayout\"><div class=\"kt-row-column-wrap kt-has-2-columns kt-row-layout-equal kt-tab-layout-inherit kt-mobile-layout-row kt-row-valign-top\">\n<style>.kadence-column11290_60182e-d8 > .kt-inside-inner-col,.kadence-column11290_60182e-d8 > .kt-inside-inner-col:before{border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-bottom-left-radius:0px;}.kadence-column11290_60182e-d8 > .kt-inside-inner-col{column-gap:var(--global-kb-gap-sm, 1rem);}.kadence-column11290_60182e-d8 > .kt-inside-inner-col{flex-direction:column;}.kadence-column11290_60182e-d8 > .kt-inside-inner-col > .aligncenter{width:100%;}.kadence-column11290_60182e-d8 > .kt-inside-inner-col:before{opacity:0.3;}.kadence-column11290_60182e-d8{position:relative;}@media all and (max-width: 1024px){.kadence-column11290_60182e-d8 > .kt-inside-inner-col{flex-direction:column;justify-content:center;}}@media all and (max-width: 767px){.kadence-column11290_60182e-d8 > .kt-inside-inner-col{flex-direction:column;justify-content:center;}}<\/style>\n<div class=\"wp-block-kadence-column kadence-column11290_60182e-d8\"><div class=\"kt-inside-inner-col\">\n<p>To access your files via FTP, you\u2019ll need to find your FTP connection details through your hosting provider&#8217;s control panel. Once you have this information, you can use FTP software like <a href=\"https:\/\/filezilla-project.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">FileZilla<\/a> or <a href=\"https:\/\/www.smartftp.com\/en-us\/\" target=\"_blank\" rel=\"noreferrer noopener\">SmartFTP<\/a> to connect to your website using FTP. Once you are connected via FTP, you will be able to access your website directories.<\/p>\n<\/div><\/div>\n\n\n<style>.kadence-column11290_dc9bf5-11 > .kt-inside-inner-col,.kadence-column11290_dc9bf5-11 > .kt-inside-inner-col:before{border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-bottom-left-radius:0px;}.kadence-column11290_dc9bf5-11 > .kt-inside-inner-col{column-gap:var(--global-kb-gap-sm, 1rem);}.kadence-column11290_dc9bf5-11 > .kt-inside-inner-col{flex-direction:column;}.kadence-column11290_dc9bf5-11 > .kt-inside-inner-col > .aligncenter{width:100%;}.kadence-column11290_dc9bf5-11 > .kt-inside-inner-col:before{opacity:0.3;}.kadence-column11290_dc9bf5-11{position:relative;}@media all and (max-width: 1024px){.kadence-column11290_dc9bf5-11 > .kt-inside-inner-col{flex-direction:column;justify-content:center;}}@media all and (max-width: 767px){.kadence-column11290_dc9bf5-11 > .kt-inside-inner-col{flex-direction:column;justify-content:center;}}<\/style>\n<div class=\"wp-block-kadence-column kadence-column11290_dc9bf5-11\"><div class=\"kt-inside-inner-col\"><style>.kb-image11290_d9ed13-f2 .kb-image-has-overlay:after{opacity:0.3;}<\/style>\n<figure class=\"wp-block-kadence-image kb-image11290_d9ed13-f2 size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1193\" height=\"816\" src=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2024\/09\/FTP-Panel.jpg\" alt=\"FTP Panel\" class=\"kb-img wp-image-9770\" srcset=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2024\/09\/FTP-Panel.jpg 1193w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2024\/09\/FTP-Panel-300x205.jpg 300w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2024\/09\/FTP-Panel-1024x700.jpg 1024w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2024\/09\/FTP-Panel-768x525.jpg 768w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2024\/09\/FTP-Panel-360x246.jpg 360w\" sizes=\"auto, (max-width: 1193px) 100vw, 1193px\" \/><\/figure>\n<\/div><\/div>\n\n<\/div><\/div>\n\n<style>.kb-row-layout-id11290_f3a2cc-86 > .kt-row-column-wrap{align-content:start;}:where(.kb-row-layout-id11290_f3a2cc-86 > .kt-row-column-wrap) > .wp-block-kadence-column{justify-content:start;}.kb-row-layout-id11290_f3a2cc-86 > .kt-row-column-wrap{column-gap:var(--global-kb-gap-md, 2rem);row-gap:var(--global-kb-gap-md, 2rem);padding-bottom:var(--global-kb-spacing-xxs, 0.5rem);grid-template-columns:repeat(2, minmax(0, 1fr));}.kb-row-layout-id11290_f3a2cc-86 > .kt-row-layout-overlay{opacity:0.30;}@media all and (max-width: 1024px){.kb-row-layout-id11290_f3a2cc-86 > .kt-row-column-wrap{grid-template-columns:repeat(2, minmax(0, 1fr));}}@media all and (max-width: 767px){.kb-row-layout-id11290_f3a2cc-86 > .kt-row-column-wrap{grid-template-columns:minmax(0, 1fr);}}<\/style><div class=\"kb-row-layout-wrap kb-row-layout-id11290_f3a2cc-86 alignnone wp-block-kadence-rowlayout\"><div class=\"kt-row-column-wrap kt-has-2-columns kt-row-layout-equal kt-tab-layout-inherit kt-mobile-layout-row kt-row-valign-top\">\n<style>.kadence-column11290_7ea7ea-bb > .kt-inside-inner-col,.kadence-column11290_7ea7ea-bb > .kt-inside-inner-col:before{border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-bottom-left-radius:0px;}.kadence-column11290_7ea7ea-bb > .kt-inside-inner-col{column-gap:var(--global-kb-gap-sm, 1rem);}.kadence-column11290_7ea7ea-bb > .kt-inside-inner-col{flex-direction:column;}.kadence-column11290_7ea7ea-bb > .kt-inside-inner-col > .aligncenter{width:100%;}.kadence-column11290_7ea7ea-bb > .kt-inside-inner-col:before{opacity:0.3;}.kadence-column11290_7ea7ea-bb{position:relative;}@media all and (max-width: 1024px){.kadence-column11290_7ea7ea-bb > .kt-inside-inner-col{flex-direction:column;justify-content:center;}}@media all and (max-width: 767px){.kadence-column11290_7ea7ea-bb > .kt-inside-inner-col{flex-direction:column;justify-content:center;}}<\/style>\n<div class=\"wp-block-kadence-column kadence-column11290_7ea7ea-bb\"><div class=\"kt-inside-inner-col\"><style>.kb-image11290_53c23b-7a .kb-image-has-overlay:after{opacity:0.3;}<\/style>\n<figure class=\"wp-block-kadence-image kb-image11290_53c23b-7a size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"764\" height=\"380\" src=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2024\/09\/Local-Directory-Sample.gif\" alt=\"Local Directory Sample\" class=\"kb-img wp-image-9768\" \/><figcaption>Example of a local directory.<\/figcaption><\/figure>\n<\/div><\/div>\n\n\n<style>.kadence-column11290_a1de18-4c > .kt-inside-inner-col,.kadence-column11290_a1de18-4c > .kt-inside-inner-col:before{border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-bottom-left-radius:0px;}.kadence-column11290_a1de18-4c > .kt-inside-inner-col{column-gap:var(--global-kb-gap-sm, 1rem);}.kadence-column11290_a1de18-4c > .kt-inside-inner-col{flex-direction:column;}.kadence-column11290_a1de18-4c > .kt-inside-inner-col > .aligncenter{width:100%;}.kadence-column11290_a1de18-4c > .kt-inside-inner-col:before{opacity:0.3;}.kadence-column11290_a1de18-4c{position:relative;}@media all and (max-width: 1024px){.kadence-column11290_a1de18-4c > .kt-inside-inner-col{flex-direction:column;justify-content:center;}}@media all and (max-width: 767px){.kadence-column11290_a1de18-4c > .kt-inside-inner-col{flex-direction:column;justify-content:center;}}<\/style>\n<div class=\"wp-block-kadence-column kadence-column11290_a1de18-4c\"><div class=\"kt-inside-inner-col\"><style>.kb-image11290_8d634d-73 .kb-image-has-overlay:after{opacity:0.3;}<\/style>\n<figure class=\"wp-block-kadence-image kb-image11290_8d634d-73 size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1108\" height=\"634\" src=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2024\/09\/Host-File-Editor-Sample.gif\" alt=\"Host File Editor Sample\" class=\"kb-img wp-image-9769\" \/><figcaption>Example of hosting file manager.<\/figcaption><\/figure>\n<\/div><\/div>\n\n<\/div><\/div>\n\n\n<p>Inside of your website directory, you\u2019ll find the <code>wp-config.php<\/code> file. This is the file that needs to be edited for this process.<\/p>\n\n\n<style>.kb-image11290_5ddfd9-fd.kb-image-is-ratio-size, .kb-image11290_5ddfd9-fd .kb-image-is-ratio-size{max-width:275px;width:100%;}.wp-block-kadence-column > .kt-inside-inner-col > .kb-image11290_5ddfd9-fd.kb-image-is-ratio-size, .wp-block-kadence-column > .kt-inside-inner-col > .kb-image11290_5ddfd9-fd .kb-image-is-ratio-size{align-self:unset;}.kb-image11290_5ddfd9-fd figure{max-width:275px;}.kb-image11290_5ddfd9-fd .image-is-svg, .kb-image11290_5ddfd9-fd .image-is-svg img{width:100%;}.kb-image11290_5ddfd9-fd .kb-image-has-overlay:after{opacity:0.3;}<\/style>\n<div class=\"wp-block-kadence-image kb-image11290_5ddfd9-fd\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"333\" height=\"223\" src=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2024\/09\/WP-Config-File.jpg\" alt=\"WP Config File\" class=\"kb-img wp-image-9773\" srcset=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2024\/09\/WP-Config-File.jpg 333w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2024\/09\/WP-Config-File-300x201.jpg 300w\" sizes=\"auto, (max-width: 333px) 100vw, 333px\" \/><\/figure><\/div>\n\n\n\n<p>Open the <code>wp-config.php<\/code> file in your preferred text editor. <em>(On most hosting file managers, you can often edit files directly within the interface.)<\/em> If you are using an FTP connection, you can download the file and open it with a text editor like Notepad or VS Code.<\/p>\n\n\n<style>.kb-image11290_4c6f67-b1.kb-image-is-ratio-size, .kb-image11290_4c6f67-b1 .kb-image-is-ratio-size{max-width:560px;width:100%;}.wp-block-kadence-column > .kt-inside-inner-col > .kb-image11290_4c6f67-b1.kb-image-is-ratio-size, .wp-block-kadence-column > .kt-inside-inner-col > .kb-image11290_4c6f67-b1 .kb-image-is-ratio-size{align-self:unset;}.kb-image11290_4c6f67-b1 figure{max-width:560px;}.kb-image11290_4c6f67-b1 .image-is-svg, .kb-image11290_4c6f67-b1 .image-is-svg img{width:100%;}.kb-image11290_4c6f67-b1 .kb-image-has-overlay:after{opacity:0.3;}<\/style>\n<div class=\"wp-block-kadence-image kb-image11290_4c6f67-b1\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"778\" height=\"426\" src=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2024\/09\/WP-Config.gif\" alt=\"WP Config\" class=\"kb-img wp-image-9772\" \/><\/figure><\/div>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading11290_08069a-78, .wp-block-kadence-advancedheading.kt-adv-heading11290_08069a-78[data-kb-block=\"kb-adv-heading11290_08069a-78\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading11290_08069a-78 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading11290_08069a-78[data-kb-block=\"kb-adv-heading11290_08069a-78\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading11290_08069a-78 img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading11290_08069a-78[data-kb-block=\"kb-adv-heading11290_08069a-78\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h3 class=\"kt-adv-heading11290_08069a-78 wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading11290_08069a-78\">Editing the wp-config file<\/h3>\n\n\n\n<p>Inside the wp-config.php file, you will need to add a line of code and save the file. Find the text that says;<br><code>\/* That's all, stop editing! Happy publishing. *\/<\/code><br><br>Before the stop editing line, add the following line of code to enable the WordPress database repair tool.<br><code>define( 'WP_ALLOW_REPAIR', true );<\/code><\/p>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading11290_03bbec-a1, .wp-block-kadence-advancedheading.kt-adv-heading11290_03bbec-a1[data-kb-block=\"kb-adv-heading11290_03bbec-a1\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading11290_03bbec-a1 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading11290_03bbec-a1[data-kb-block=\"kb-adv-heading11290_03bbec-a1\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading11290_03bbec-a1 img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading11290_03bbec-a1[data-kb-block=\"kb-adv-heading11290_03bbec-a1\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<p class=\"kt-adv-heading11290_03bbec-a1 wp-block-kadence-advancedheading has-theme-palette-8-background-color has-background\" data-kb-block=\"kb-adv-heading11290_03bbec-a1\">Since the repair tool does not require authentication, leaving this line in place could pose a security risk. Therefore, it is important to remove the <code>define( 'WP_ALLOW_REPAIR', true );<\/code> line of code from the <code>wp-config.php<\/code> file after you are finished using the database repair tool<\/p>\n\n\n<style>.kb-image11290_5c010e-f5 .kb-image-has-overlay:after{opacity:0.3;}<\/style>\n<figure class=\"wp-block-kadence-image kb-image11290_5c010e-f5 size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1652\" height=\"933\" src=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2025\/03\/Enable-Repair.gif\" alt=\"Enable Repair\" class=\"kb-img wp-image-11292\" \/><\/figure>\n\n\n\n<p>Then, save the <code>wp-config.php<\/code> file and complete the steps below to run the database repair tool.<\/p>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading11290_a92eb9-88, .wp-block-kadence-advancedheading.kt-adv-heading11290_a92eb9-88[data-kb-block=\"kb-adv-heading11290_a92eb9-88\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading11290_a92eb9-88 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading11290_a92eb9-88[data-kb-block=\"kb-adv-heading11290_a92eb9-88\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading11290_a92eb9-88 img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading11290_a92eb9-88[data-kb-block=\"kb-adv-heading11290_a92eb9-88\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h2 class=\"kt-adv-heading11290_a92eb9-88 wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading11290_a92eb9-88\">Running the WordPress database repair tool<\/h2>\n\n\n\n<p>Once the WordPress database repair is enabled in the <code>wp-config.php<\/code> file, you will have access to run this tool by using the following URL.<br><code>https:\/\/yourwebsite.com\/wp-admin\/maint\/repair.php<\/code><br><br>Just replace <code>yourwebsite.com<\/code> with your website domain.<\/p>\n\n\n<style>.kb-image11290_4570a8-61 .kb-image-has-overlay:after{opacity:0.3;}<\/style>\n<figure class=\"wp-block-kadence-image kb-image11290_4570a8-61 size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2560\" height=\"1309\" src=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2025\/03\/Repair-Database-scaled.jpg\" alt=\"Repair Database\" class=\"kb-img wp-image-11293\" srcset=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2025\/03\/Repair-Database-scaled.jpg 2560w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2025\/03\/Repair-Database-300x153.jpg 300w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2025\/03\/Repair-Database-1024x523.jpg 1024w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2025\/03\/Repair-Database-768x393.jpg 768w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2025\/03\/Repair-Database-1536x785.jpg 1536w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2025\/03\/Repair-Database-2048x1047.jpg 2048w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2025\/03\/Repair-Database-360x184.jpg 360w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><\/figure>\n\n\n\n<p>You can <strong>Repair<\/strong> the <strong>Database<\/strong> or <span style=\"text-decoration: underline\"><strong>Repair and Optimize<\/strong><\/span> the <strong>Database<\/strong>. Running the repair can generally help when it comes to database-related WordPress errors\/issues. If you continue to experience issues after running the repair, additional troubleshooting may be required.<br><br>Once you are finished using the database repair tool, you must remove the <code>define( 'WP_ALLOW_REPAIR', true );<\/code> line of code from your <code>wp-config.php<\/code> file. <br><br>This tool does not require authentication, therefore can be a security risk. So once you are done with this feature, edit the wp-config.php file, and remove the <code>define( 'WP_ALLOW_REPAIR', true );<\/code> line of code.<\/p>\n\n\n<style>.kb-image11290_8c184b-22 .kb-image-has-overlay:after{opacity:0.3;}<\/style>\n<figure class=\"wp-block-kadence-image kb-image11290_8c184b-22 size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1177\" height=\"532\" src=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2025\/03\/Removing-Code.gif\" alt=\"Removing Code\" class=\"kb-img wp-image-11302\" \/><\/figure>\n\n\n\n<p>Once finished, be sure to save the <code>wp-config.php<\/code> file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are encountering errors related to your WordPress database, WordPress includes a built-in repair tool that can help resolve database-related issues. This guide will walk you through enabling and using this tool for troubleshooting purposes. Important: Before proceeding, it is recommended to back up your website and database before running this tool. While this&#8230;<\/p>\n","protected":false},"author":148263,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kadence_starter_templates_imported_post":false,"_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":""},"doc_category":[403,419],"doc_tag":[],"knowledge_base":[6],"class_list":["post-11290","docs","type-docs","status-publish","hentry","doc_category-theme-troubleshooting","doc_category-troubleshooting-blocks","knowledge_base-kadence-theme"],"year_month":"2026-04","word_count":592,"total_views":"2289","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"display_name":"victormonk","author_link":"https:\/\/www.kadencewp.com\/help-center\/author\/victormonk\/"},"doc_category_info":[{"term_name":"Troubleshooting","term_url":"https:\/\/www.kadencewp.com\/help-center\/knowledge-base\/kadence-theme\/theme-troubleshooting\/"},{"term_name":"Troubleshooting Blocks","term_url":"https:\/\/www.kadencewp.com\/help-center\/knowledge-base\/kadence-blocks\/troubleshooting-blocks\/"}],"doc_tag_info":[],"knowledge_base_info":[{"term_name":"Kadence Theme","term_url":"https:\/\/www.kadencewp.com\/help-center\/knowledge-base\/kadence-theme\/","term_slug":"kadence-theme"}],"knowledge_base_slug":["kadence-theme"],"taxonomy_info":{"doc_category":[{"value":403,"label":"Troubleshooting"},{"value":419,"label":"Troubleshooting Blocks"}],"knowledge_base":[{"value":6,"label":"Kadence Theme"}]},"featured_image_src_large":false,"comment_info":0,"_links":{"self":[{"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/docs\/11290","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/users\/148263"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/comments?post=11290"}],"version-history":[{"count":12,"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/docs\/11290\/revisions"}],"predecessor-version":[{"id":11308,"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/docs\/11290\/revisions\/11308"}],"wp:attachment":[{"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/media?parent=11290"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/doc_category?post=11290"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/doc_tag?post=11290"},{"taxonomy":"knowledge_base","embeddable":true,"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/knowledge_base?post=11290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}