views:

46

answers:

4

My friend has a blog that has more than 300k posts on it. The performance of the blog has pretty much crippled his server. Is there a know limit to the posts on WP, or are there any performance optimizations that one can perform?

The blog posts are intended for archiving.

+1  A: 

Is there a know limit to the posts on WP

If all posts are to be kept which is likely, there is not way of limiting them other than deleting some of them, so basically no option for limiting them.

or are there any performance optimizations that one can perform?

At the database level, indexing could be added or memcache can be implemented.

You may find these articles interested for optimization/performance:

Sarfraz
This answer doesn't really answer my question. For general website optimization yes, but for WP specifics no.q
monksy
The optimizations could be applied to all sorts of sites including wp but no problem :)
Sarfraz
+2  A: 

You can probably greatly increase the blog speed by deleting all your post/page revisions from the database. I've seen databases with only 500 posts/pages shrink from 35 megs to 5 megs after cleaning, with a resulting huge increase in blog speed and usability. Run this query in phpmyadmin, changing table the prefixes as necessary, and backup the database beforehand.

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'

Or use this plugin: http://wordpress.org/extend/plugins/bulk-delete/

Then add this line to wp-config.php to stop revisions:

`define ('WP_POST_REVISIONS', FALSE);

And then in phpmyadmin, optimize the database by selecting all the tables and then using the dropdown menu. That will delete all the overhead from cleaning the revisions.

songdogtech
If i'm not mistake you seem to be hinting at a bit of bloat in each post. All of these posts do not have a revision. The post is a final deal.
monksy
A: 

To improve the performance, you'd better choose a better permlinks, number is better than the others.

For example, I use the following

/%category%/%post_id%

in my website, I won't use /%category%/%post_name% because it will hurt your performance very much.

Simon
I'm sorry... i don't follow you, or the context of your post.
monksy
+2  A: 

These are always the two things about optimization: (1) figure out what's really causing the problem and (2) do less work.

You have to ask: what is it that's actually slowing things down? The easiest thing to check is the database -- you need to look up MySQL's Slow Query Log. It will tell you which queries are taking the most time. Then you can fix them by (a) creating indexes, (b) rewriting your theme not to use them, or (c) caching the results of the query.

If there are no unusually slow queries, then you'll have to look deeper -- profile your PHP. But there will be slow queries. That's the way of Wordpress.

novalis