Repair MySQL Database of Your WordPress Blog

Last week, I found that all the posts from my wife’s blog Vedics (https://vedics.in) are gone. Search bar, sidebar, widgets and menus were visible but I couldn’t see any posts. Vedics is a high performing blog established in year 2016 with 540+ articles on food, spirituality & travel. Loosing all the content suddenly was a bummer for us. I mean we do have content backup of Vedics, but restoring backup and bringing Vedics back to production would have taken at least 3 working days considering restoring the latest backup from archives and most importantly, the kind of lazy person I think I’m.  😉

So, before planning backup and restore of Vedics or contacting web hosting service provider, I took the matter in my own hands and started the investigation to see if I can fix this issue.

Step 1: Find if all the content are available in File Manager

WordPress keep all the media content in wp-content directory. So, I logged in to cPanel > File Manager > Public_HTML > WordPress site (Vedics) > wp-content folder to see I’ve latest files are folder available. The answer is yes, all the files and folder were present. Nothing happened to them.

Step 2: Repair WordPress MySQL database

Since all the WordPress files and folders were available and as per similar issue of not seeing any post on your WordPress blog posted by others on the web, arguably, it was clear that there is some issue with WordPress MySQL database. Hence, I decided to repair MySQL database of Vedics and see if it works.

  • Backup MySQL database one more time. I already had recent backup of MySQL database but I took the backup another time.

Login to cPanel > and visit phpMyAdmin 

  • Select appropriate database and click on Export to download your database.
  • If you’ve multiple database listed in phpMyAdmin and you’re are unsure about correct database name, click wp_options table by expanding the database. View the table contents to find siteurl and blogname.
  • Look for some somechar_options table name if wp_options doesn’t exist. 
  • Select all the tables by selecting Check all, open the drop-down & click Repair table

Table repair should be quick, It took ~3 mins in my case to complete the repair successfully. I was able to see all the posts on https://vedics.in after database repair.

I hope this post was informative to you. I’ll catch you in next post. Until then, Namastey & salute. 🙂

Leave a Reply

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

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>