If you see that in your WordPress blog there are no posts and pages or if you are unable to login to your WordPress admin section, or if there’s anything else happening with your blog which is not normal then, your WordPress database might have corrupted. To fix this, there are two methods:
1) From WordPress: Use FileZilla or any other FTP client and open file wp-config.php. It must be in path: public_html/wp-config.php
Then, add this line of code anywhere in this file:
define(‘WP_ALLOW_REPAIR’, true);
Open your browser, and go to: https://www.thatsjournal.com/wp-admin/maint/repair.php
Replace thatsjournal.com with your own domain name. Then, click on “Repair and Optimize Database”. When you are done, remove the above line which you added from the wp-config.php file.
2) From cPanel: Login to the cPanel of your blog. Go to: “MySQL Databases”. Then, click on “Repair Database”.
If you have a cPanel installed in your web hosting account then, I would recommend Method-2 always as it is faster than Method-1.