Support » Fixing WordPress » Database is large. How to make it smaller

  • Hi. I have a wordpress blog with almost 65000 posts, 41500 photos and 3200 comments. Link of the site is here : . The problem is that my database’s size is almost 520 mb . I optimised it and deleted post revisions and orphan options. The only plugins that i have and make database registers are : seo by yoast – yet another related posts.
    So in generally the size of tables is :

    posts : 311,4 MB
    post meta : 149,9 MB
    comments : 1,2 MB
    hook_list : 9,5 MB
    terms : 2,2 MB
    term-relationships : 7,5 MB
    yarpp : 41 MB
    options : 243 KB
    term_taxonomy : 1,1 MB

    I use Cloudflare and Cdn service together.

    So sometimes i receive for instance : Database error connection … for 2-3 sec only, and i think there is problem… I have read something about patches. Is it worth trying? Please help me…

Viewing 7 replies - 1 through 7 (of 7 total)
  • Try this plugin to optimize your tables:

    520MB is not a large database. You might need a better host.

    Thanks for your answer shirazdrum. I optimise the database directly from phpmyadmin.

    I want to see your comments, when a database is big for my currently website (posts – images) . I was thinking about seo plugin by yoast, as it records a lot of rows for every post. What do you think about this?

    Thanks for your answer shirazdrum. I optimise the database directly from phpmyadmin.

    Optimizing your database from phpMyadmin only deletes the overheads. Try the plugin above as it deletes a lot of useless junks that WordPress keeps.

    i tried it now … no improvement. Just deleted some bytes from last revisions..

    also can’t back up the database, because of size! when i try to export nothing happens!

    The backup on this plugin never worked to begin with, but the optimizer works. Your database is fine, there is not much to do. MySQL connection errors don’t necessarily happen because of your db size. You might be on a bad shared server with bunch of other sites using lots of resources. If you keep getting errors, you need to find a better host.

    If you can’t use the phpMyadin to export, you need to dump the database from the command line.

    mysqldump -u [USERNAME] -p [DBNAME] | gzip > [/path_to_file/DBNAME].sql.gz

    EDIT: take out the square brackets of course

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Database is large. How to make it smaller’ is closed to new replies.