Taking WordPress Blogging Offline
After my extremely annoying experience with a broken network connection last weekend that cost me about an hour of writing, I've been thinking about what could be done to make sure such a thing couldn't happen again. I believe looking into offline access for WordPress may represent a viable solution.
I think having offline access to your blog's post writing would be a great feature to have for blog authors. It means, for example, that you'd be able to take a laptop on holiday with you and know that you can at least
write your blog posts when they're in your head and you can upload them to your server when you have an internet connection.
It also means that you wouldn't need to have WordPress connected to the internet to be able to save posts. This means that clicking save has no chance of losing your work since it is saved to a local database. Another side effect is that periodically saving the post can occur much more frequently since local access is much faster and lower latency than accessing a remote server.
The problem, naturally, is how to implement this new functionality.
I think that offline access to the entire blog administration area is going to be practically impossible. This is mostly because of WordPress's extremely flexible plugin system which means no two blogs can never be assumed to contain the same features. In fact, most blogs would have quite a number of modifications to the admin area such as SEO optimisations for posts and pages, comment filters, related posts and so on. This is, of course, to say nothing of the options for all of those plugins, as well as the themes used for the blog. So, overall, I believe true offline functionality would need to be limited to the "write" pages and, even then, the functionality of the system would need to be limited to the bare essentials: title, post content, optional excerpt, categories, trackbacks, and the post options such as post slug, post status, etc. Other pages could still be shown from a cached version with "disabled in offline mode" in a lightbox or something.
Some of my programmer intuition (is there such a thing?) tells me that there might be room for a devious system design that could read the code of the rendered writing page, pick out all the extra fields that are placed in there by plugins and add these dynamically to the local database store. This would effectively get around the reconciliation issue. I'm not how easy that would be to implement but my brief foray into jQuery makes me think it shouldn't be that hard to detect "new" input fields.
There are still synchronisation issues but these are present in any web application wishing to provide offline functionality.
Overall, I'd say an offline WordPress system is definitely possible but how much work involved to get around some of the issue may be another matter entirely. I shall endeavour to look into the creation of a "WordPress Offline" plugin once I have time.