Support » Fixing WordPress » A really huge database (5,00,000 posts) : The front end works fine

  • Hi

    I have a wordpress blog having about 5,00,000 posts. The website works fine (I have a good server which is optimised well). But the admin panel edit.php file which lists the posts takes a lot of time to load. (more than 15seconds).I think this is because when I open http://site/wp-admin/edit.php it sorts the entire 5,00,000 posts according to date. Otherwise, everything works absolutely fine (editing posts, creating new posts everything is superfine!)

    So, is there any way to speed this admin panel edit.php up? I dont want to wait 15seconds. May be if automatic sorting according to date is removed and that page lists the last 10 posts in the default order then it will become fine.

    Any opinions?

    (PS. : If its a paid plugin etc, then I am willing to buy it. )

Viewing 6 replies - 1 through 6 (of 6 total)
  • I assume you have the screen options in dashboard set to display only the last ten posts. I don’t know about modifying or working on edit.php, but have you worked on reducing the size of the database itself by deleting post revisions?

    Run this SQL query to delete revisions (only after you have good backups on a database that size!):

    DELETE a,b,c
    FROM wp_posts a
    LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)
    LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
    WHERE a.post_type = 'revision'
    Thread Starter champ_rock


    ya. I use Wp-optimise plugin. It deletes post revisions. that is not an issue.

    Have you tried modifying line 826 of /wp-admin/post.php temporarily to remove the orderby clause to diagnose to see if that solves the performance problem?





    If it fixed it then you’ll know what you need to do is figure out what hook you need to call in order to trap this problem. If not, you know it’s not the sorting of dates.

    Let me know if it helped, please.

    Thread Starter champ_rock


    /wp-admin/post.php doesnt have 800 lines at all. I cant find the code that you mentioned in that file.

    You are:

    – missing indexes in your database.
    – running into with WP ticket #11375:

    In short, with this amount of posts, it is absolutely necessary to optimize the daylights out of your queries, in order to make sure that an index is always used. Else you end up sorting temporary tables.

    Also, make sure you use memcached.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘A really huge database (5,00,000 posts) : The front end works fine’ is closed to new replies.