Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a Wordpress install with a very large amount of pages (a few hundred thousand), and over time it has gotten to the point where editing a page takes an extremely long amount of time. It would take several minutes just to open the edit screen, but I found out that it was wp_pages used in generating the parent page selection dropdown that caused that, so I removed it via a hook in my theme's functions.php and so now the edit screen loads just fine.

Now the problem I have is that when updating/editing a page, it never seems to complete whatever it is doing. The page keeps on loading after hitting update, but it does successfully edit the page within a couple of seconds (I can verify that on the frontend), but in the admin it just keeps going until I just manually refresh the page. Any one know what wordpress function might be causing this sort of timeout on saving a page?

I have wordpress 3.5.1 and I've tried to disable any running plugins. Any ideas?

Just to add, eventually I get a 500 server error after letting it run for about 30 minutes. Here is the server's log:

[Sat Jan 26 13:11:12 2013] [warn] [client] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: 
[Sat Jan 26 13:11:12 2013] [error] [client] Premature end of script headers: post.php, referer: 
[Sat Jan 26 13:11:12 2013] [warn] [client] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: 
[Sat Jan 26 13:11:12 2013] [error] [client] Premature end of script headers: admin-ajax.php, referer: 
share|improve this question
Small suggestion, but what if you delete all revisions from database, repair and optimize it? Have you researched for related topics here? At the right sidebar, there is a list of Related Q&A's. – brasofilo Jan 26 '13 at 18:58
Tried that too :( Not a whole lot of revisions at the moment anyways since the posts are mostly generated through Wordpress' API right now – joren Jan 27 '13 at 0:10

1 Answer 1

Have you tried optimizing and repairing the table in your MySQL database you are running Wordpress on?

Your can manually do this with phpmyadmin:

Or you can install a Wordpress plugin such as WP Database Optimizer and set a regular optimization schedule:

share|improve this answer
Thanks for posting. I have tried out multiple optimization methods without any luck :( – joren Feb 6 '13 at 19:50
Hmmm. What kind of hosting are you using? A site with hundreds of thousands of pages definitely wouldn't play nice on a shared hosting account. Wordpress tends to be somewhat of a CPU hog. – Chaoix Feb 6 '13 at 22:01
I do have a dedicated VPS with 1GB of RAM, but I'm 99% sure even getting a better server won't fix the issue. It's apparent that certain Wordpress functions just aren't meant for a website with the amount of pages I have. The fact that removing the parent page dropdown from the edit screen with a hook allowed it to actually load in a couple of seconds as opposed to timing out after an hour of loading. That was caused from Wordpress' wp_pages function. Frontend pages all load in under 2 seconds, even ones running a lot of queries generating dynamic pages. – joren Feb 7 '13 at 15:33
That makes sense. If you don't mind me asking why do you have 100s of 1000s of pages on one Wordpress install? Surely Wordpress MU would be a better organization of your web content. Wordpress MU runs which hosts millions of blogs. – Chaoix Feb 7 '13 at 20:30
Eh, unfortunately it's a bit of a monster that has evolved way too much over the past year. We would have gone a totally different route had we known it would end up where it is at now, and we won't have the funds to rebuild it for a while still. – joren Feb 8 '13 at 1:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.