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 Replies to “If your WordPress 2.1 is slow…”

  1. 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.

  2. 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.

  3. 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!

  4. 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.

Comments are closed.