WordPress & Permalinks for Pages
After my post on increasing WordPress Performance, I’ve been helping several other people with their overloaded website.
The most unique probably is the one owned by (let’s call him) Mr. King.
Mr. King has got a very popular website. PageRank 2 only, but since it’s a niche rarely targeted by others, people are flocking there anyway.
He’s making (my guess) thousands of dollars every month, just from Google AdSense shown on his website.
However, the popularity brings other problems. His powerful server (I think it’s a quad core,with 4 GB RAM) was constantly overloaded.
After I optimized the server, it’s working fine now.
Except for the static pages.
First, a little bit about “static” page in WordPress. It’s not really static actually, it’s dynamically generated. In itself it’s not a problem.
However, when you utilize WordPress’ permalink feature, essential to make your website more visible on Google, **and** you have thousands of pages; then it started to get, um, “interesting”. Note that this may probably an understatement
considering the fun I had while optimizing the website.
Basically, I think this is how permalink for pages works in WordPress :
[ 1 ] A visitor requested a page, in the form of a people (and Google) friendly link.
Example : http://asiablogging.com/links-2-asia/
[ 2 ] Due to WordPress-generated .htaccess file, Apache will translate the permalink into loading index.php and passing along that permalink to it.
[ 3 ] WordPress will lookup that permalink in the rewrite table, and got the real URL.
The rewrite lookup record can be viewed with this SQL command :
select * from wp_options where option_name=’rewrite_rules’;
[ 4 ] The real URL loaded and shown to the visitor.
So far so good.
However, when we’re talking about **thousands** of pages, then things started to become messy.
Last time I checked, the rewrite lookup table (the thing I was talking about in point 3 above) for Mr. King’s website is about 21 MB in size.
And **everytime** he add a new page, that record will be recreated again, from scratch.
WP developers have acknowledged the problem as very serious. This is because the way it works at the moment (WordPress version 2.3.1), this scheme is not scalable / will give poor performance over as little as 1000 pages.
And since it’s within the WordPress’ core, it will require a rather significant overhaul to get this fixed.
Don’t get it wrong, they’re (I think) most happy and flattered that some people are actually trying to make WordPress to work as substitute of a Wiki
It’s just that there’s this technical glitch at the moment that will be causing difficulties to many others from following the same path.
So last time I checked, they’re very interested to get this fixed.
Back to Mr.King – I have now optimized the server so it performs much faster, despite the bottleneck I described above.
There’s still slowdown noticable when creating a new page, but it’s now quite bearable
Anyway, again that was fun indeed. I guess this is why I chose IT as my career path back there years ago – it was fun (and very useful to many people), and it still is today.
Enjoy !
update:
His server had problems and crashing his website. Mr King said that the datacenter guys are looking into it, but I’m welcome to look around as well.
Soon it’s pretty clear that the hard drive of the server is dying. I told Mr King to relay that to the techies, which responded with “how did you figure it out ?” (dmesg + google – duh).
Long story cut short – they botched big time, but thankfully I managed to snatch a backup of Mr King’s website before it went down the flames.
Now I host Mr King’s website on my server, and he’s a very happy guy again.



January 15th, 2008 11:50
This guy sounds familiar…. Hey Harry ! nice article … I need to get in touch with you. Please reply!~ Take care.
February 7th, 2008 05:58
I have been a frequent visitor of this blog for some time now, so I thought it would be a good idea to leave you with my thanks.
Regards,
Jim Mirkalami
February 13th, 2008 18:34
Hi
I came across your post in a Google Search because I had not realised that Pages do not get permalinks unless .htaccess is writable. I can fix that for new Pages but is there a procedure or script for re-writing the permalinks for Pages after they have been created.
I probably have misunderstood a lot along the way of my thinking above but will be grateful for advice and pointers.
John
February 14th, 2008 05:37
Hi John, there are several Wordpress Redirection plugins available. Basically, they’ll inform incoming visitors (and search engine bots) with code 301 and the new location of the page. So you won’t lost visitors (and search engine rank) because of this.
.
Be aware though that each plugins are different. You’ll need to evaluate each carefully to find the one that fully suited for your needs.
.
Hope this helps.
.
February 21st, 2008 01:37
Great job, most people would only recommend a more expensive hosting plan
February 26th, 2008 11:31
Interesting. There are some good ideass presented here. I need to do spend some time reading more about these topics.
April 11th, 2008 00:43
I’ve noticed lag time with a brand new installation. I wonder if things will change soon.
January 16th, 2009 23:40
I have a similar issue that I am trying to deal with. Does anyone know of the best wordpress plugin to deal with this situation?
January 18th, 2009 15:33
So king guy only has a PR of 2 and he’s doing that well? Wow, let me know what his site is about, maybe I need to change my blog from being about credit cards to whatever he is doing! Well heck, with the economy in the crapper and banks going bankrupt I should be changing anyway :p
January 20th, 2009 03:56
thank you for the recommend. Good job
January 21st, 2009 03:53
I have the same issue that I am trying to deal with. Does anyone know of the best wordpress plugin to deal with this problem?
January 24th, 2009 06:48
Perfect writeup… I’ve been trying to figure out how to properly set up my permalinks and was getting pretty frustrated until I came across this post.
February 4th, 2009 11:43
Great how to post. I’ve had the same issue myself on some sites and it was a daunting task to consider before I set out. Optimization had the same affect while there were problems with the static pages. Thanks again!
February 7th, 2009 02:34
Interesting. There are some good ideass presented here. I need to do spend some time reading more about these topics.
February 7th, 2009 05:11
I’ve noticed lag time with a brand new installation. I wonder if things will change soon.
February 10th, 2009 01:25
I can appreciate all of the hard work that you must have went through in preparation for all of the information that you relayed to all of us above. thanks
February 16th, 2009 01:01
I am having the same problem and this issue that I am trying to deal with. Does anyone know of the best wordpress plugin to deal with this problem?
Great job, most people would only recommend a more expensive hosting plan
February 18th, 2009 09:46
I know what you mean about the credit card sites…
I think it’s time to change alright!
July 27th, 2009 19:15
Varieties of plugins are available in wordpress for redirection purposes. But its your duty to find out the plugin that will be of best use for your needs.
September 2nd, 2009 05:58
looks like some great stuff, thanks!
September 16th, 2009 12:56
Great information. I’ve ran into that same problem on our site on a couple of occasions. Our IT staff needs to regroup and gain a laser focus on an overloaded website. It can be a really hairy situation.
March 10th, 2010 12:57
I think prmilinks is very import. It can help your page catch by search engery.