If your Wordpress 2.1 is slow…
I just debugged a strange issue with this Wordpress 2.1 blog. It’s running 2.1.2 to be exact, but I think the problem manifests itself with all 2.1.x versions. My site was running really slow - 40-50 seconds per page load. I had just moved it to this new host which is also running a few Rails apps. The Rails apps were running *fast*, so it wasn’t the box.
I checked top and it showed the box was fine. I bounced Apache and MySQL. Still slow. I tried static pages - those were fine. I tried a phpinfo page - that was fine.
I googled and googled and finally found this Wordpress thread: [resolved] Update a post and blam.. every pageload is 20 seconds. The solution? I had to add www.luisdelarosa.com to the /etc/hosts file. I guess WP 2.1 has some sort of reverse DNS code in it.
So - if your Wordpress 2.1 site is slow, add your blog’s hostname to the /etc/hosts file. You could also backtrack to Wordpress 2.0.1. I’ll have to look into moving over to Mephisto sometime.
5 Comments
- Daniel Jalkut replied:
Why Mephisto? Is it better than WordPress in other ways? It seems like finding and fixing a little tweak like this is … frustrating … but that you’d be not unlikely to suffer similar setbacks on any blog system.
April 6th, 2007 at 7:31 am. Permalink.
- luis replied:
Daniel,
Well if I have to delve into the PHP code to fix Wordpress (which I was tempted to when I couldn’t find the answer), then I’ll just go with a Rails-based blogging system since I spend a lot of my time with Ruby on Rails nowadays.
But for now, I’ll keep going on Wordpress.
April 6th, 2007 at 1:24 pm. Permalink.
- Daniel Jalkut replied:
Ah - I didn’t realize Mephisto was Rails-based. Typo is also Rails as you may know.
April 6th, 2007 at 1:30 pm. Permalink.
- dee replied:
i have this slowness problem too, but i’m blog dumb. when you say add the hostname to /etc/host where exactly do i find that? thanks so much!
May 18th, 2007 at 11:57 pm. Permalink.
- Dan Lapoint replied:
dee, you need to have root access to your web server to do that. the hosts file is sort of like “manual DNS”. If you want to custom-specify an IP/Name relation, you would add the IP address and the hostname to this file.
I know this is an old post, but I just had the same problem, and adding the server’s IP and the blog’s hostname to /etc/hosts did fix the problem.
December 13th, 2007 at 9:13 am. Permalink.