Title: WordPress Database Corruption, Well not exactly
Last modified: August 30, 2016

---

# WordPress Database Corruption, Well not exactly

 *  [mr9v9](https://wordpress.org/support/users/mr9v9/)
 * (@mr9v9)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/wordpress-database-corruption-well-not-exactly/)
 * So I keep running into a brick wall trying to figure something out, and was wondering
   if anyone had this problem in the past:
    Everything is fine while editing pictures,
   posts etc. All of a sudden there is a 500 internal server error, and the only
   change was the .htaccess file had a space added, or a line of code changed by
   wordpress…very random hard to recreate. In turn this “corrupts” the file and 
   it simply needs to be renamed to get the site back to normal. Best fix was to
   click save on permalinks page twice. No plugins are touching this file to my 
   knowledge. I have seen this behavior on the old shared hosting site before the
   move, and the only real “fix” was messing with the permissions of the file, I
   think it was 644, but I might have increased it later on. Second issue this creates
   is looking at PHPMYAdmin and checking the database, and oops one table got corrupted(
   wp_postmeta), well okay wait I try and repair it and it does not repair. I go
   to the site and you can’t see any products! I run a database repair using WordPress’s
   built in database fix functions, also has an issue. I go back to PHPMyAdmin and
   check all the tables, now they show up fine, back to the site I re-run the database
   fix, it works!. Then I look at it again and it looks broken, and on and on and
   on again. I try looking at the site it’s fine all of a sudden, the hosting company
   says my tables are fine. The only person who is crazy in this whole scenario 
   is me…because I know for a fact that somewhere in wp_postmeta there really is
   a corruption. I also ran a Plugin that sweeps data and when I try to clean up
   Orphaned Post Meta it will not clean it up. I’m thinking about running a SQL 
   query to fix those, but I am very worried that it could mess something up further.
   I am trying to clean up this site from previous users and this is driving me 
   crazy!

Viewing 1 replies (of 1 total)

 *  Thread Starter [mr9v9](https://wordpress.org/support/users/mr9v9/)
 * (@mr9v9)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-corruption-well-not-exactly/#post-6755733)
 * This is a tricky subject and so far it has been a confusing process to reverse
   engineer a fix.
    The majority of the problem can be attributed to outdated custom
   posts, old plugins and data that cannot be deleted by normal means (not sure 
   what to look for) and Database connection issues causing the site to fluctuate
   and change the permalink settings. I even had a case when it occurred and a person
   got a back ordered item in stock, and my stock went -1. Funny because we don’t
   allow backorders. It’s almost like the database locks and can’t unlock in time.
   I have made it stable by modifying just about anything and everything on WHM 
   and other configs to get it stable. I now have my .htaccess file on 444 because
   WordPress could rewrite the same rules over and over again with a space between.
   I can update this post when there is some headway but I am suprised by the number
   of non-replies on my posts.

Viewing 1 replies (of 1 total)

The topic ‘WordPress Database Corruption, Well not exactly’ is closed to new replies.

## Tags

 * [Corruption](https://wordpress.org/support/topic-tag/corruption/)
 * [database](https://wordpress.org/support/topic-tag/database/)
 * [db](https://wordpress.org/support/topic-tag/db/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [mr9v9](https://wordpress.org/support/users/mr9v9/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-corruption-well-not-exactly/#post-6755733)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
