{"id":170,"date":"2011-12-10T08:00:34","date_gmt":"2011-12-10T08:00:34","guid":{"rendered":"http:\/\/pixert.com\/blog\/?p=170"},"modified":"2011-12-08T10:06:25","modified_gmt":"2011-12-08T10:06:25","slug":"repair-wordpress-database","status":"publish","type":"post","link":"https:\/\/pixert.com\/blog\/repair-wordpress-database\/","title":{"rendered":"Repair WordPress Database"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"25\" data-permalink=\"https:\/\/pixert.com\/blog\/how-to-upgrade-wordpress\/wordpresslogo\/\" data-orig-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png?fit=498%2C113&amp;ssl=1\" data-orig-size=\"498,113\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"WordPress &#8211; the logo\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png?fit=300%2C68&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png?fit=498%2C113&amp;ssl=1\" class=\"aligncenter size-medium wp-image-25\" title=\"WordPress - the logo\" src=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=300%2C68\" alt=\"\" width=\"300\" height=\"68\" srcset=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png?resize=300%2C68&amp;ssl=1 300w, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png?w=498&amp;ssl=1 498w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><strong>When a WordPress table crash, one symptom might be that all of your posts seem to have disappeared, or perhaps all of your drafts<\/strong>. You may even get a message in phpMyAdmin telling you that one of your tables haves crashed. No need to worry. Repairing tables is very easy.<\/p>\n<p><strong>Warning<\/strong> : backup the WordPress database \u00a0before attempting to repair tables<\/p>\n<p>1. phpMyAdmin<\/p>\n<p>a. Login to phpMyAdmin and select the affected database<br \/>\nb. Check the boxes by the tables that need repair.<\/p>\n<figure id=\"attachment_174\" aria-describedby=\"caption-attachment-174\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/phpmyadminrepair.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"174\" data-permalink=\"https:\/\/pixert.com\/blog\/repair-wordpress-database\/phpmyadminrepair\/\" data-orig-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/phpmyadminrepair.jpg?fit=1064%2C640&amp;ssl=1\" data-orig-size=\"1064,640\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"repair phpMyAdmin \" data-image-description=\"\" data-image-caption=\"&lt;p&gt;repair WordPress database with phpMyAdmin&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/phpmyadminrepair.jpg?fit=300%2C180&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/phpmyadminrepair.jpg?fit=1024%2C615&amp;ssl=1\" class=\"size-medium wp-image-174\" title=\"repair phpMyAdmin \" src=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/phpmyadminrepair-300x180.jpg?resize=300%2C180\" alt=\"\" width=\"300\" height=\"180\" srcset=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/phpmyadminrepair.jpg?resize=300%2C180&amp;ssl=1 300w, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/phpmyadminrepair.jpg?resize=1024%2C615&amp;ssl=1 1024w, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/phpmyadminrepair.jpg?w=1064&amp;ssl=1 1064w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-174\" class=\"wp-caption-text\">repair WordPress database with phpMyAdmin (click to see the screenshot)<\/figcaption><\/figure>\n<p>2. WordPress built-in Repair Tool<\/p>\n<p>Many users \u00a0are not aware about WordPress\u2019s built-in database repair and optimize functionality, as it is not available in admin back-end. This feature available in WordPress 2.9 and later<\/p>\n<figure id=\"attachment_175\" aria-describedby=\"caption-attachment-175\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/repairwpdb.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"175\" data-permalink=\"https:\/\/pixert.com\/blog\/repair-wordpress-database\/repairwpdb\/\" data-orig-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/repairwpdb.jpg?fit=520%2C232&amp;ssl=1\" data-orig-size=\"520,232\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"Repair WordPress Database\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Repair WordPress database with WP built-in repair tool&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/repairwpdb.jpg?fit=300%2C133&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/repairwpdb.jpg?fit=520%2C232&amp;ssl=1\" class=\"size-medium wp-image-175 \" title=\"Repair WordPress Database\" src=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/repairwpdb-300x133.jpg?resize=300%2C133\" alt=\"\" width=\"300\" height=\"133\" srcset=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/repairwpdb.jpg?resize=300%2C133&amp;ssl=1 300w, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/repairwpdb.jpg?w=520&amp;ssl=1 520w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-175\" class=\"wp-caption-text\">Repair WordPress database with WP built-in repair tool (click to see the screenshot)<\/figcaption><\/figure>\n<p>a. Simply add the following line in wp-config.php To setup the automatic database repair option,<\/p>\n<pre class=\"brush: bash; title: Code Block; notranslate\" title=\"Code Block\">define('WP_ALLOW_REPAIR', TRUE);<\/pre>\n<p>b.\u00a0Login to admin section of WordPress blog by visiting http:\/\/yourdomain.com\/wp-login.php<\/p>\n<p>c. Go to http:\/\/yourdomain.com\/wp-admin\/maint\/repair.php,\u00a0you can see page with options to \u2018Repair Database\u2019 and to \u2018Repair and Optimize Database\u2019. Just click on one of the option.<\/p>\n<ul>\n<li>If you click on \u2018Repair Database\u2019 button,\u00a0 WordPress can automatically search for\u00a0some common database problems and repair them.<\/li>\n<li>If you click on \u2018Repair and Optimize Database\u2019 button, WordPress can also attempt to optimize the database. This improves performance in some situations. Repairing and optimizing the database can take a long time and the database will be locked while optimizing.<\/li>\n<\/ul>\n<p>d. You can remove step (a) after you done.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When a WordPress table crash, one symptom might be that all of your posts seem to have disappeared, or perhaps all of your drafts. You may even get a message in phpMyAdmin telling you that one of your tables haves crashed. No need to worry. Repairing tables is very easy. Warning : backup the WordPress [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":174,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[8,13,5],"tags":[9,15,69,6,7],"class_list":["post-170","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-cpanel","category-wordpress","tag-centos-2","tag-cpanel-2","tag-phpmyadmin","tag-wordpress-2","tag-wp"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/phpmyadminrepair.jpg?fit=1064%2C640&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1pvi1-2K","jetpack-related-posts":[{"id":157,"url":"https:\/\/pixert.com\/blog\/wordpress-database-optimization\/","url_meta":{"origin":170,"position":0},"title":"WordPress Database Optimization","author":"Pixel Insert \/ Pixert","date":"December 9, 2011","format":false,"excerpt":"WordPress is powered by PHP and depends on MySQL database; in fact, all the content, including the website settings, are stored in it. When your WordPress site is visited, the web server will query the database to retrieve all the necessary information to display. However, over time, the speed required\u2026","rel":"","context":"In &quot;CentOS&quot;","block_context":{"text":"CentOS","link":"https:\/\/pixert.com\/blog\/category\/centos\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/wpoptimize.jpg?fit=1009%2C895&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/wpoptimize.jpg?fit=1009%2C895&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/wpoptimize.jpg?fit=1009%2C895&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/wpoptimize.jpg?fit=1009%2C895&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":201,"url":"https:\/\/pixert.com\/blog\/remove-wordpress-revisions\/","url_meta":{"origin":170,"position":1},"title":"Remove WordPress Revisions","author":"Pixel Insert \/ Pixert","date":"February 16, 2012","format":false,"excerpt":"WordPress Posts Revisions are useful especially in the case of a multi author blog. However, There is a cost to having all these saved revisions of your posts in the aspect of database entries. Instead of having a single MySQL database record for your post you will have multiple records\u2026","rel":"","context":"In &quot;WordPress&quot;","block_context":{"text":"WordPress","link":"https:\/\/pixert.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":22,"url":"https:\/\/pixert.com\/blog\/how-to-upgrade-wordpress\/","url_meta":{"origin":170,"position":2},"title":"How to Upgrade WordPress","author":"Pixel Insert \/ Pixert","date":"March 6, 2011","format":false,"excerpt":"A few steps to upgrade WordPress 1. Backup WordPress database with phpmyadmin or WordPress Database Backup plugin 2. Deactivate any plugins 3. Delete files and folders, except wp-config.php files and wp-content folder 4. Upload the latest WordPress, except wp-config.php files and wp-content folder 5. Type in domain_name\/wp-admin\/upgrade.php\u00a0 or domain_name\/wp-admin on\u2026","rel":"","context":"In &quot;WordPress&quot;","block_context":{"text":"WordPress","link":"https:\/\/pixert.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":76,"url":"https:\/\/pixert.com\/blog\/how-to-get-administrator-access-back-in-wordpress\/","url_meta":{"origin":170,"position":3},"title":"How to get Administrator access back in WordPress?","author":"Pixel Insert \/ Pixert","date":"March 30, 2011","format":false,"excerpt":"Your role was Administrator. Suddenly, someone has changed your role in WordPress. You login to WordPress admin as a subscriber,you see \u00a0Profile page\u00a0instead getting fully-functional Admin page. \u00a0 How to get your role as an Administrator back? 1. Get help from another Administrator You can ask another Administrator to switch\u2026","rel":"","context":"In &quot;WordPress&quot;","block_context":{"text":"WordPress","link":"https:\/\/pixert.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wprole.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":98,"url":"https:\/\/pixert.com\/blog\/wordpress-which-privileges-are-needed-by-mysql-database-user\/","url_meta":{"origin":170,"position":4},"title":"WordPress: Which privileges are needed by MySQL Database User","author":"Pixel Insert \/ Pixert","date":"May 2, 2011","format":false,"excerpt":"The famous 5 minutes installation for WordPress state that: Create a database for WordPress on your web server, as well as a MySQL user who has all privileges for accessing and modifying it Most installation instruction for WordPress on the web state that you can GRANT ALL PRIVILEGES to that\u2026","rel":"","context":"In &quot;cPanel&quot;","block_context":{"text":"cPanel","link":"https:\/\/pixert.com\/blog\/category\/cpanel\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/05\/mysqlwp.jpg?fit=523%2C368&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":111,"url":"https:\/\/pixert.com\/blog\/how-to-disable-directory-browsing\/","url_meta":{"origin":170,"position":5},"title":"How to disable directory browsing?","author":"Pixel Insert \/ Pixert","date":"June 3, 2011","format":false,"excerpt":"One of the must do on setting a secure Apache webserver is to disable directory browsing. This could prevent the server from showing a listing of the existing files if there's no index in one folder. Disable directory browsing via .htaccess Add in the .htaccess file the following [bash] Options\u2026","rel":"","context":"In &quot;CentOS&quot;","block_context":{"text":"CentOS","link":"https:\/\/pixert.com\/blog\/category\/centos\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/feather-small.gif?resize=350%2C200","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/170","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/comments?post=170"}],"version-history":[{"count":0,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/170\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media\/174"}],"wp:attachment":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media?parent=170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/categories?post=170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/tags?post=170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}