How to Repair a WordPress Database

Search Engine Optimization (SEO) Tips
PayPal is offering $ 45 billion for Pinterest

WordPress has grown a lot since its inception in which it served as a blogging tool and today it is a full-fledged CMS that is used as the foundation for managing content and publications by all kinds of highly regarded websites around the world. But if there is something interesting about your project that was created by Maat mullenwegg and what first saw the lights of day in 2003 is its highest scalability which allows us to use it equally whether it is a home server or the website of a large company.

Despite its quality, Of WordPress is not exemption from problems and therefore it can happen that the database is damaged in its entirety aur just in some tables. In any case, it will be more than enough for our blog not to display properly as it is responsible for telling the CMS where to look for the texts, images and other content that we see in each post.

An unmistakable symptom of this is the following message in the log of our WordPress installation: ‘WordPress database error table’ ./my_home/wp_posts’ has crashed and was marked last (automatic?) Repair for query failed SELECT post_date_gmt FROM wp_posts WHERE post_status = ‘publish’ AND post_type IN (‘post’, ‘page’, ‘Appendix’) ORDER BY post_date_gmt DESC LIMIT 1 created by require (‘wp-blog-header.php’), wp, WP-> main, WP-> send_headers, get_lastpostmodified , get_lastpostdate, _get_last_post_time ‘

Let’s see how to fix The corrupted database in your WordPress installation for which we have to enter the control cpanel of our server, which, as those who have hosted their own domain in a hosting know well, is the section from which to go we access the configuration of the various parameters and modules that are part of it.

There we need to go to the section of Databases -> MySQL Databases where we should look for the option ‘Repair Database’ found in the section of ‘Modify Databases’ . To guide us better, this section is located below the section on ‘Create New Database’ so we need to select the database that we want to be repaired and then click on the button  Repair Database’ after which we will be given the status of the database of our WordPress Installation appears and we should see that everything went well ‘OK’ next to the name of each table that makes up it.

Now maybe instead of it Cpanel let’s have root access to the server where the database is. This is the case if we host our own server or if it is at a university or in a company. This will allow us to work in a way we law Linuxers are used to, and it’s from the command line .

The first step is to stop the MySQL server :

$ sudo service mysql stop

Then we correct the database which shows us problems which we do with the following command:

$ cd / var / lib /
$ sudo myisamchk -r -v -f mysql / /.

Then we just restart the MySQL server:

$ sudo service mysql start

Both approaches allow us to solve a problem that is generally more isolated, although its occurrence is crucial for the correct visualization of our blog or website (or that of the company we work for) for which in the event of an event a solution is required as soon as possible.

Martin Bond
Martin Bond
Admin Nash has been writing about Tech News games and the gaming industry for nearly a decade. When he’s not writing about games, he’s usually playing them. You can find him on Twitter talking about games or sports

Leave a Reply

Your email address will not be published. Required fields are marked *

This website uses cookies to improve your experience. By using this website you agree to our Data Protection Policy.
Read more