How to Speed Up Your WordPress Site

I haven’t had the best relationship with the issue of site speed over the years, if I’m honest. I mean, even though I knew that it’s obviously important, I wasn’t doing much testing to find out how fast my site was for its actual audiences.

After all, the site loaded just fine for me (when doing administrative tasks, publishing content and so on), so it’s probably the same for my audience too, right?

Well, not quite. As it turned out, the average visitor had to wait around eight seconds (that’s 8) for my site to load. I was quite shocked to see that number, and that’s probably why I remember it so clearly.

PhoneGap and WordPress for building mobile applications

These days many developers are exploring ways to speed up and to simplify mobile application development process. And I see more an more tools created for this reason.

Today I noticed one such tool which takes slightly different approach. It allows you to build mobile applications by using WordPress CMS. Its called Apppreser.
They help you to convert WordPress based HTML sites to a native mobile applications by wrapping them to PhoneGap framework.

The idea is to use WordPress plugins to talk to PhoneGap APIs and this way connect to mobile hardware.

Even if folks from Apppress are charging quite a few bucks for their plugins and implementation the use case is promising. There are plenty of websites powered by WordPress and theoretically it should be possible to make HTML5 mobile applications from them with a little bit of effort.

As for the high price for the service, I’m sure there will soon be open source versions of such plugins available. WordPress developer community is known for creating great open source plugins.

What do you think about such way of creating HTML based mobile apps?

Please Stop Using cURL in WordPress Plugins

WordPress HTTP class usage

Unfortunately, I keep finding WordPress plugins that try to call cURL functions directly. Unfortunately, not only do these plugins fail to work if cURL isn’t installed, it throws a fatal PHP error in the process.

The problem with using cURL in WordPress plugins is that WordPress solved that problem more than 2 years ago by implementing the WP_Http class. WP_Http is a class included in the WordPress core that has multiple options. One of those options is cURL, but it gracefully reverts to other PHP functions if cURL isn’t available.

Basically, anything you can do with cURL can be done with the WP_Http class, and it will allow your plugin to be much more versatile and compatible with more server setups.

WordPress Multi-Site: Get Featured Image from Another Blog

Yesterday, David Bisset posted a tweet asking the following question:

Is there a function similar to get_the_post_thumbnail for multi-site (to grab a featured image from a post of a particular blog id)?

At the time, it seemed that the best way to do so was to use the Sitewide Tags plugin for WordPress, which, I believe, does offer some functionality similar to this (I haven’t used the plugin, yet, so I can’t say for sure).

Developer Resources