Have you suddenly discovered that your posts and pages have all disappeared? Your blog theme/template is still there but it’s saying no posts found?
This has happened to four clients in the last week, three on Hostgator and one on another. I know Hostgator are gradually upgrading all their servers and I’ve no idea if this is the cause but wouldn’t be surprised.
The reason (in these cases) has been a crashed wp_posts database table. The error message given (if you get one at all in your theme or admin menu) is often: “wp_posts is marked as crashed and should be repaired”. To fix is pretty simple. Login to your host’s control panel and go to the phpMyAdmin option. This brings up a list of your databases. Select the one you’re using for WordPress to see the WordPress tables in that database. A list like this will appear (the actual number and name of some tables will vary depending on the plugins used):
You can see the problem here, wp_posts is labeled as “in use” and is locked. To repair, simply check the box next to wp_posts and select Repair table, as in the image below.
You should then get a success message and your posts will have reappeared. If not then you may have a bigger problem, but at least you have a recent backup. Right?!
THANK YOU THANK YOU THANK YOU!!!!!!!!!!
This saved my sanity, got my posts back!!
Glad I could help!
Amazing, thank you very very much for this awesome tutorial, very impressed, i thought my content had gone but by following your tutorial my content is now back up. Thanks so much!
@couponfreaks Great, I’m glad!
Great and awesome post ever! I’m impress, I learn a lot of things here and it is truly great. Thanks for sharing it!
Thanks!
Thank you so much!
@mississippimom You’re welcome!
oh my goodness! Thank you!!!
Thanks a lot Joel…you made my day! I
Glad to help!
Hi there,
Many thanks for this entry. I thought my 10 years worth of blog postings were all done the drain!
Great, glad to help!
Oh my goodness – thank God I found this post! Thank you so much xxxx
Glad to help!
Thanks Williams….!!! awesome post….I bet it might have saved tons of blogs 🙂
No problem!
Holy crap, I freaked out for a minute. 🙂 Thanks so much!
No problem!
Holy crap, I freaked out for a minute. 🙂 Thanks so much!
Hi Joel, You saved me from a meltdown! I am citing your post on my blog and crediting you for the save.
Thanks!
Thank you very much 🙂
Thank you for saving me from a heart attack! Yours was the only data I was able to find on this. I called Host Gator and the tech fixed it in 1 minute. You get a red rose!
Happy it helped!
Happy it helped!
Thank you, unbelievably helpful. Just saved a client from a whole lot of frustration!
Thanks Joel! I was able to restore my posts but am still getting error messages for all the pages on my site. Is there another table that manages the pages or links to the pages?
Hi Ken. Posts and pages are held in the same table, so what error message are you getting? Is it for all Pages? There may be some problem with the table still, but posts and pages are almost the same in the database so there is something funny going on.
Thanks for replying Joel. Turns out my PermaLink Structure got changed. Had to go into my .htaccess file and change permission to 666, then go into WP_Settings_Permalinks and restore the custom structure I had previously setup. It was a simple fix that I found at Squidoo.com.
Thanks for helping – I had a small heart attack when I first discovered the problem.
I appreciate the update Ken, glad you got it sorted 🙂
Thanks Joel! I was able to restore my posts but am still getting error messages for all the pages on my site. Is there another table that manages the pages or links to the pages?
Hi Ken. Posts and pages are held in the same table, so what error message are you getting? Is it for all Pages? There may be some problem with the table still, but posts and pages are almost the same in the database so there is something funny going on.
Thanks for replying Joel. Turns out my PermaLink Structure got changed. Had to go into my .htaccess file and change permission to 666, then go into WP_Settings_Permalinks and restore the custom structure I had previously setup. It was a simple fix that I found at Squidoo.com.
Thanks for helping – I had a small heart attack when I first discovered the problem.
I appreciate the update Ken, glad you got it sorted 🙂
I was able to recover the pages as well. THANKS AGAIN! YOU ARE A BLOG SAVER!!!!!!!!!!!!!!!!!!!!!!!!!!!111
I was able to recover the pages as well. THANKS AGAIN! YOU ARE A BLOG SAVER!!!!!!!!!!!!!!!!!!!!!!!!!!!111
Thank you so much! This worked and brought my posts back is there a similar way to bring the pages of the blog back!
Fantastic, happy to help!
Thank you so much! This worked and brought my posts back is there a similar way to bring the pages of the blog back!
Fantastic, happy to help!
i found it, the problem was revver video plugin, even though it was installed and i deactivated all plugins, revver was the problem just by being there!
Great, thanks for letting me know you solved it Tony! You did the right thing deactivating the plugins, but you never can tell. Also if ever doing an upgrade, if there are new versions of any plugins, always upgrade those before upgrading WordPress. Glad it’s working for you now!
i found it, the problem was revver video plugin, even though it was installed and i deactivated all plugins, revver was the problem just by being there!
Great, thanks for letting me know you solved it Tony! You did the right thing deactivating the plugins, but you never can tell. Also if ever doing an upgrade, if there are new versions of any plugins, always upgrade those before upgrading WordPress. Glad it’s working for you now!
It seems i have a bigger problem.
they want to charge me too for to get restored to the last time they did a back up which was sunday, thats 3 days blogging lost and some long posts were in there too.
They also didnt see what the fault was.
i have no idea if it will happen again.
Any suggestions?
It seems i have a bigger problem.
they want to charge me too for to get restored to the last time they did a back up which was sunday, thats 3 days blogging lost and some long posts were in there too.
They also didnt see what the fault was.
i have no idea if it will happen again.
Any suggestions?
If you think Joel’s free advice is good (and it is), try hiring him. BEST decision I ever made on the web!
Thanks Kevin, much appreciated!
If you think Joel’s free advice is good (and it is), try hiring him. BEST decision I ever made on the web!
Thanks Kevin, much appreciated!
I was working on my site when suddenly all the pages and all the posts were gone … just vanished.
By Googling “my pages and posts have disappeared” I found this site and I want to say thank you Joel for having a solution at hand here.
One thing though … when I got into my cpanel I couldnt find the “myphpadmin” anywhere. After investigation I found out that my problem was that I was using the “x”-theme in my cpanel, which apparantly doesnt have this feature. By changing it to “x3”-cpanel theme, the “myphpadmin” appeared and I was able to fix the problem.
Thanks again Joel.
Good point, I hadn’t though of the cPanel themes thanks. You can also find phpMyAdmin under MySQL databases at the very bottom of that page. Glad you got it fixed!
I was working on my site when suddenly all the pages and all the posts were gone … just vanished.
By Googling “my pages and posts have disappeared” I found this site and I want to say thank you Joel for having a solution at hand here.
One thing though … when I got into my cpanel I couldnt find the “myphpadmin” anywhere. After investigation I found out that my problem was that I was using the “x”-theme in my cpanel, which apparantly doesnt have this feature. By changing it to “x3”-cpanel theme, the “myphpadmin” appeared and I was able to fix the problem.
Thanks again Joel.
Good point, I hadn’t though of the cPanel themes thanks. You can also find phpMyAdmin under MySQL databases at the very bottom of that page. Glad you got it fixed!
Thanks Joel, great fix, wasn’t thinking clearly enough to get there on my own. I’d just sent out a load of marketing material yesterday then my site crashed! I’m with united hosting by the way.
Thanks Joel, great fix, wasn’t thinking clearly enough to get there on my own. I’d just sent out a load of marketing material yesterday then my site crashed! I’m with united hosting by the way.
Joel, you are a lifesaver. As you know from my emails, I was in a panic and you graciously saved the day – on a Sunday, no less. Thanks for everything!
No problem at all Edie 🙂
Joel, you are a lifesaver. As you know from my emails, I was in a panic and you graciously saved the day – on a Sunday, no less. Thanks for everything!
No problem at all Edie 🙂
Thanks this worked great!! I was in panic!!
Thanks this worked great!! I was in panic!!
Phew! I sure am glad I found this post. 160+ articles sent to oblivion and I thought that I was going to have to replace them all. I’m with Hostgator too but I haven’t ever had any problems with them before.
Thanks for the info
Glad that helped!
Phew! I sure am glad I found this post. 160+ articles sent to oblivion and I thought that I was going to have to replace them all. I’m with Hostgator too but I haven’t ever had any problems with them before.
Thanks for the info
Glad that helped!
OMG you just saved me from a massive panic attack. It worked exactly as you said. I’ve bookmarked this in case it happens again.
Glad I could help!
OMG you just saved me from a massive panic attack. It worked exactly as you said. I’ve bookmarked this in case it happens again.
Glad I could help!
Big thanks. I thought I was hacked but your solution fixed everything. I am also on Hostgator.
Big thanks. I thought I was hacked but your solution fixed everything. I am also on Hostgator.
Thanks this is great.This has happened to me also.
Thanks this is great.This has happened to me also.
Hi Joel,
Yes happended to me too at same time – hostgator was my host. and i think many many others, thx for the guide.
Lance
Hi Joel,
Yes happended to me too at same time – hostgator was my host. and i think many many others, thx for the guide.
Lance
THANK YOU! This just happened to me and I was freaking out until I read this, it worked perfectly- all is right in the world now!
Great, glad I could help, that’s what I’m here for 🙂
THANK YOU! This just happened to me and I was freaking out until I read this, it worked perfectly- all is right in the world now!
Great, glad I could help, that’s what I’m here for 🙂