• I recently deleted a lot of old articles on my WordPress blog. I currently have about 2,500 articles, and deleted about 1,500. My database ballooned in size, from about 125 MB to 400 MB. When I look at it in PhpMyAdmin, I see that there are more than 6,000 entries in the wp_posts table, though it only takes up about 15 MB.

    I’ve tried checking and repairing the database in Cpanel, and everything is fine. I tried an optimize plugin for WordPress, which did some stuff, but didn’t shrink the database very much. I can figure out how to reduce the size of the database.

    When I look at the database in PhpMyAdmin, the total of all the tables is about 47 MB, so something is wrong. Any idea what’s going on and how I can fix this? I think the size of the database is going to affect the performance of my site.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @kirkmc

    Maybe its stored in trash status or your database username does not have access to remove the data. You can delete it manually via custom quires.

    Rajan V

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Thread Starter kirkmc

    (@kirkmc)

    “Maybe its stored in trash status”

    You mean in WordPress’s trash? There was a lot of stuff I trashed, then deleted. That’s what I think went wrong; WordPress didn’t delete it from the database. What sort of custom query can I use? I am not very comfortable with that, because of the risk of hosing the database.

    I did try an optimize plugin; it shrank the DB a tiny bit, maybe a few MB, bot nothing more.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    What does wp-optimize say about revisions, orphaned data, etc?

    Thread Starter kirkmc

    (@kirkmc)

    A few revisions, no orphaned data. It says the DB is 43,5 MB. I just checked in Cpanel, and it has shrunk since yesterday to 177 MB, but I still don’t understand the discrepancy.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    What is a post? These are all rows in wp_posts: attachments (images), posts, pages, and any custom post types you might have like events, portfolios, etc. So the count of rows in wp_posts is not the same as the number of posts.

    Thread Starter kirkmc

    (@kirkmc)

    Oh, that makes sense. But the size discrepancy certainly doesn’t.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Don’t worry about the physical size of the database unless you’re hitting limits imposed by your host.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Database contains thousands of deleted articles’ is closed to new replies.