<input type="hidden" id="_wpnonce" name="_wpnonce" value="1fbfd39e73" /><input type="hidden" name="_wp_http_referer" value="/blog/wp-json/wp/v2/posts/3569" /><input type="hidden" id="_wpnonce" name="_wpnonce" value="1fbfd39e73" /><input type="hidden" name="_wp_http_referer" value="/blog/wp-json/wp/v2/posts/3569" />{"id":3569,"date":"2015-06-30T15:23:19","date_gmt":"2015-06-30T05:23:19","guid":{"rendered":"https:\/\/www.businesslegions.com\/blog\/?p=3569"},"modified":"2017-01-13T13:39:49","modified_gmt":"2017-01-13T02:39:49","slug":"wordpress-database-repair","status":"publish","type":"post","link":"https:\/\/www.businesslegions.com\/blog\/2015\/06\/30\/wordpress-database-repair\/","title":{"rendered":"WordPress Database Repair"},"content":{"rendered":"<!--CusAds0--><p>Today, one of my sites was not loading correctly &#8211; images and text were not displaying which I guessed that the database was corrupted.<br \/>\nIn an older post I outlined how to repair <a href=\"https:\/\/www.businesslegions.com\/blog\/2014\/09\/26\/check-repair-mysql-tables-using-mysqlcheck\/\" target=\"_blank\">mySQL tables using a tool called mysqlcheck<\/a>. This process may have been a bit too difficult for some so I wanted to outline an easier way of doing a repair if you&#8217;re using WordPress. Follow these steps:<\/p>\n<p>1. Login to your hosting account<\/p>\n<p>2. Edit the wp-config.php file<\/p>\n<p>3. Add the line<\/p>\n<pre class=\"\">define('WP_ALLOW_REPAIR', true);<\/pre>\n<p>So the config should look like this:<\/p>\n<p><a href=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WordPress-Repair-Database.png?strip=all&w=2560\"><img decoding=\"async\" class=\"alignnone size-full wp-image-3601\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WordPress-Repair-Database.png?strip=all\" alt=\"WordPress Repair Database\" width=\"494\" height=\"126\" srcset=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WordPress-Repair-Database.png?strip=all 494w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WordPress-Repair-Database-300x77.png?strip=all 300w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WordPress-Repair-Database.png?strip=all&amp;w=98 98w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WordPress-Repair-Database.png?strip=all&amp;w=197 197w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WordPress-Repair-Database.png?strip=all&amp;w=395 395w\" sizes=\"(max-width: 494px) 100vw, 494px\" \/><\/a><\/p>\n<p>4. Make sure you save the file.<\/p>\n<p>5.Now go to your wordpress site: e.g.<\/p>\n<p>http:\/\/websiteaddress.com\/wp-admin\/maint\/repair.php<\/p>\n<p>You will see the below screen. Just click on Repair and Optimize Database.<\/p><!--CusAds0-->\n<p><a href=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WordPress-Repair-Database-Screen.png?strip=all&w=2560\"><img decoding=\"async\" class=\"alignnone size-full wp-image-3600\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WordPress-Repair-Database-Screen.png?strip=all\" alt=\"WordPress Repair Database Screen\" width=\"779\" height=\"469\" srcset=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WordPress-Repair-Database-Screen.png?strip=all 779w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WordPress-Repair-Database-Screen-300x181.png?strip=all 300w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WordPress-Repair-Database-Screen.png?strip=all&amp;w=155 155w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WordPress-Repair-Database-Screen.png?strip=all&amp;w=467 467w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/WordPress-Repair-Database-Screen.png?strip=all&amp;w=623 623w\" sizes=\"(max-width: 779px) 100vw, 779px\" \/><\/a><\/p>\n<p>6. Let it run and once completed test your site to see if it now works.<\/p>\n<p>7. If it works, then go back into the wp-config.php file and remote the line<\/p>\n<pre class=\"\">define('WP_ALLOW_REPAIR', true);<\/pre>\n<div class=\"lt-box\" style=\"border:1px solid #1a4ccc\"><div class=\"lt-box-title\" style=\"background-color:#215fff;border-top:1px solid #a6bfff;text-shadow:1px 1px 0 #0a1c4c\">RESOURCES<\/div><div class=\"lt-box-content\">\n<p>Here&#8217;s a list of resources that you might find useful:<\/p>\n<p><a href=\"http:\/\/www.wordpress.org\" target=\"_blank\">WordPress Site<\/a><\/p>\n<p><a href=\"https:\/\/www.businesslegions.com\/blog\/2014\/09\/26\/check-repair-mysql-tables-using-mysqlcheck\/\" target=\"_blank\">Other method for repairing database using mySQL<\/a><\/p>\n<\/div><\/div>\n<div class=\"lt-box\" style=\"border:1px solid #1d6a9e\"><div class=\"lt-box-title\" style=\"background-color:#2485C6;border-top:1px solid #a7cee8;text-shadow:1px 1px 0 #0b283b\">DO YOU LIKE WHAT YOU'VE READ?<\/div><div class=\"lt-box-content\">Join our subscription list and receive our content right in your mailbox. If you like to receive some Great deals our Freebies then subscribe now!\r\n\r\n<p><div class=\"tnp tnp-subscription \">\n<form method=\"post\" action=\"https:\/\/www.businesslegions.com\/blog\/wp-admin\/admin-ajax.php?action=tnp&amp;na=s\">\n<input type=\"hidden\" name=\"nlang\" value=\"\">\n<div class=\"tnp-field tnp-field-firstname\"><label for=\"tnp-1\">Name<\/label>\n<input class=\"tnp-name\" type=\"text\" name=\"nn\" id=\"tnp-1\" value=\"\" placeholder=\"\"><\/div>\n<div class=\"tnp-field tnp-field-email\"><label for=\"tnp-2\">Email<\/label>\n<input class=\"tnp-email\" type=\"email\" name=\"ne\" id=\"tnp-2\" value=\"\" placeholder=\"\" required><\/div>\n<div class=\"tnp-field tnp-field-button\" style=\"text-align: left\"><input class=\"tnp-submit\" type=\"submit\" value=\"Subscribe\" style=\"\">\n<\/div>\n<\/form>\n<\/div>\n<\/p>\r\n\r\n<\/div><\/div><!--CusAds0-->\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>Today, one of my sites was not loading correctly &#8211; images and text were not displaying which I guessed that the database was corrupted. In an older post I outlined how to repair mySQL tables using a tool called mysqlcheck. This process may have been a bit too difficult for some so I wanted to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3601,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[634,1002,1901,449],"class_list":["post-3569","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","tag-line","tag-php","tag-repair","tag-site"],"_links":{"self":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/3569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/comments?post=3569"}],"version-history":[{"count":5,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/3569\/revisions"}],"predecessor-version":[{"id":6948,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/3569\/revisions\/6948"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/media\/3601"}],"wp:attachment":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/media?parent=3569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/categories?post=3569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/tags?post=3569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}