19 February 2014

Wordpress and slow http (wp_remote_get, ...)

Just a quickie:  I had a serious performance problems using Wordpress's wp_remote_get().  It was very slow, 5+ seconds to return values that should take well under 1 second.  Using curl and wget at the command line on the same machine using the same URL was sub 1 second.

Long story short, php5-curl wasn't installed on the Wordpress server.  Installed it, restarted Apache, and Wordpress's wp_remote_get() speed became as fast as the command line equivalents.

I don't know what Wordpress was using to hit the remote URL before I installed php5-curl, but it was incredibly slow.