Tag Archives: wordpress

New year, new web site

I took the opportunity of the Christmas break to move itwriting.com to a new server.

The old server has worked wonderfully for many years, but in that time a lot of cruft accumulated.

The old WordPress template was also out of date. Today it is necessary not only to have a site that works well on mobile, but also one that is served over SSL. I am taking advantage of Let’s Encrypt to give itwriting.com trusted SSL support.

On the old site I ran three blogs. itwriting.com, aimed at professionals. Gadgets.itwriting.com aimed at consumers. Taggedtalk.com for when I occasionally wanted to blog about music. Running three blogs is a hassle and I decided to combine them into one despite the differences in content. The idea is to use WordPress categories to make sense of this but this too is work in progress.

The price of this migration is broken links. Content that is migrated from the old itwriting.com blog is mostly fine, though there are some images linked with http that will need to be fixed. Content from the other two blogs is more problematic and I have some work to do tidying up the images. There is also the old pre-wordpress blog which is now offline. This was active from 2003 to 2006 and I am undecided about whether to reinstate it.

Apologies then for the disruption but I hope it will be worth it.

Running WordPress on Windows Azure

I am investigating hosting this site on Windows Azure, partly as a learning exercise, and possibly to enable easier scaling.

I discovered that any web site short of Standard is worthless other than for experimentation and prototyping. I set up a Small Standard Web Site (£48 per month). But what database? I recalled that you can run WordPress with SQL Server and tried using a 1GB SQL Server Web Edition hosted on Azure (£6.35 per month).

In order to use this, I used the Brandoo WordPress configuration which is set up for SQL Server. I later discovered that it uses the WP Db Abstraction plug-in which according to its home page has not been updated for two years. The installation worked, but some plug-ins reported database errors. I imported some posts and found that search was not working; all searches failed with nothing found.

My conclusion is that running WordPress with SQL Server is unwise unless you have no choice. I looked for another solution.

Azure has a Web Site template which uses WordPress and a MySQL database hosted by ClearDB. I would rather not involve another hosting company, so considered other options. One is to run a VM on Azure and to install MySQL on it. If you are doing that, you might as well put WordPress on the same VM at least until the traffic justifies scaling out. So I have created a new Medium Linux VM – two virtual cores, 3.5GB RAM – at £57 per month, with Ubuntu, and installed the LAMP stack and WordPress on that. The cost is similar to the Windows/SQL Server setup, but the VM is a higher specification, since a Small Web Site is 1 virtual core and 1.75GB RAM. You also get full access to the VM, as opposed to the limited access that a Web Site offers. The installation is a bit more effort but performance is better and it looks like this might work.

image

Perforce is developing a content management system called Chronicle, says we should version everything

I spoke to Christopher Seiwald, founder and CEO of Perforce Software, on the eve of the company’s 2011 user conference which starts today.

image

The Perforce product manages source code, dealing with version history, check-in and check-out, branching, merging and so on. It is excellent software, lightweight, fast and reliable, and there are Perforce clients for a wide range of development tools across multiple platforms. The company has been able to compete successfully against the likes of IBM and Microsoft by offering a tightly focused and vendor-neutral approach, with few dependencies, low management overhead, and fast performance.

Now Perforce is doing a web content management system, but why? “We thought the web content world was a very easy step for us, in terms of what we knew and what our customers are already using the product for.” says Seiwald. “We’re building a web content management system to sit on top of Perforce. It’s going to be open source, so our customers can extend it, and it’s built using PHP, Zend and Perforce. Our APIs are also open.”

If you look under the covers of a CMS system like WordPress, every post and comment is an entry in a database. In Perforce Chronicle, the database is abstracted by Perforce, and of course everything is versioned. “It is all hosted by Perforce, using more of a document model,” says Seiwald. “A database underlies everything, we have a database underneath our system. But the world shifted a long time ago, for certain things, from regularly indexed relational databases to things more like documents where you index everything, you index every word, because you can.”

Although the CMS system will be open source, the Perforce back end “remains our proprietary company jewels,” Seiwald told me. “I’m a big fan of open source. If we could figure out a way of funding our operation in an effective way with open source then we would, but we’re not that clever. The business model just seems to support having a proprietary back end.”

Nevertheless, there will be a free CMS server for small sites. The approach will be similar to that used for the version control system, where up to 2 users can use it for free. Sites with few authors and/or small amounts of content will likely be free. “My attitude has always been, get from people who are willing to pay their money, and if they’re not willing to pay, make sure they can use it anyhow.”

The features of the CMS are not yet available in detail, and Seiwald says the first release will be “as simple as possible. My goal is to get it out of the door so that you can manage a simple web site in Perforce. The guys who are working on the CMS are pushing to put more in; I keep pushing to get it out earlier.” However, since it is open source it should be possible to plug-in additional features.

Perforce Chronicle is part of a wider strategy, to embrace the cloud and to encourage users to version more of their content, perhaps all of it. “People are putting just about everything online somewhere, not just source code, because they think online is better than offline. Data sitting on your local desktop, that just makes people scared. Online, whether corporate online or out in the cloud online, is becoming more appealing.”

I am reminded of Microsoft SharePoint. In January 2009 I wrote a post SharePoint – the good, the bad and the ugly. Since that time SharePoint use has grown, but it still has that mix of great features, over-complex setup and maintenance, and parts that rarely seem to work as they should. I use SharePoint myself, and sometimes SharePoint decides that the document I have open is read-only, for no apparent reason. I have to save my changes locally, and then copy it back to SharePoint overwriting the original.

SharePoint may be awkward, but the problem it solves is huge: reasonably secure access to your content from anywhere, without VPN, and with versioning, programmability, and a bunch of other features. SharePoint is a way of storing content in the corporate cloud. Yesterday Apple released its iWork apps for iPhone, including Pages and Numbers. Using SharePoint web storage, I can open, edit and save documents and spreadsheets in Pages on the iPhone, for example.

Perforce source code management succeeded against ClearCase and PVCS by being simpler, faster and easier. What if Perforce web content management could do the same thing versus SharePoint? Although the Chronicle CMS has a narrower focus, listening to Seiwald it seems that his vision does extend beyond web sites and source code to embrace all corporate content. “You are all going down the road of versioning everything,” says Seiwald. Note that Perforce is getting a new web services API and a Javascript API. Seiwald describes a project his team is working on called “The Commons”:

It will provide the simplest of access to Perforce for the simplest of uses. Need to work on a document? Drag it to your desktop. Need to check it in? Drag it back to Perforce. Done. It not only is an example app for our new web services, but also takes advantages of the trend for simple, online document management – backed by the power of versioning in Perforce.

That is actually not quite enough. Users need to be able to double-click a document to open it, and save it directly from Office, before it is really seamless; and yes, SharePoint has that. Nevertheless, I think this is an interesting direction for Perforce, and done right could find a ready market.

There is a little more on Perforce Chronicle on the company blog, which is where I grabbed the screenshot, but expect more details soon as the conference proceeds.

Why is Microsoft giving away web traffic and abandoning users?

I am puzzled by Microsoft’s decision to close Live Spaces and send all its users to WordPress.com. Of course WordPress is a superior blogging platform; but Spaces made sense as an element within an integrated Live.com platform. According to Microsoft it has 7 million users and 30 million visitors; and if you accept that business on the web is all about traffic and monetizing traffic, then it strikes me as odd that Microsoft has no better idea of what to do with that traffic than to give it to someone else.

It makes me wonder what exactly Microsoft is trying to do with its Live.com web property. You can make a generous interpretation, as Peter Bright does, and say that the company is learning to focus and losing its “not invented here” religion. Or you can argue that it exposes the lack of a coherent strategy for Microsoft’s online services for consumers.

Part of the reason may be that blogging itself has changed. The original concept of an online diary or “web log” has fractured, with much of the trivia that might once have been blogged now being expressed on Facebook or Twitter. At the other end, blog engines like WordPress have evolved into capable content management systems. Many blogs are just convenient tools to author web sites.

Spaces is also a personal CMS. When combined with other features of Live.com, it provides a way of authoring your own web site, with photos, lists, documents, music and video, gadgets and other modules. You can apply themes, select layouts, and even add custom HTML. Everything integrates with the Windows Live identity system. The blog is just one element in this.

image

Now, although you can move your blog to WordPress.com, much of this is going away. Themes, gadgets, guestbook and lists are not transferred. If you were using Spaces for in effect a personal web site, you will have to start again on WordPress.

What this means is that WordPress, not Microsoft, now has the opportunity to show ads or market other services to these users.

Other services including SkyDrive, which is an excellent online storage platform, and Hotmail for email, are continuing as before. Still, the wider question is this. If Microsoft is happy to abandon 7 million users and all the customisation effort they have put into creating a personal online space, why should I trust it for email, or online storage?

Microsoft’s Dharmesh Mehta does his best to explain the decision here:

When we looked at Spaces, and what we had done with Spaces, and the more we thought about where do we want this to go, where do we think blogging evolves to, what’s important about that, you look at WordPress.com, and they’re building that. They’re doing a great job. And there really isn’t much value in us trying to compete with that.

This seems weak to me. Mehta is even less convincing when it comes to Live ID:

Windows Live ID is not really a means unto itself. There are times when it’s important for us to be able to associate an identity with someone. But there’s many things that we do where you don’t need a Windows Live ID — Photo Gallery, if you’re just using it on your PC, you don’t need a Windows Live ID at all. You can take our Mail app and connect it to Yahoo or Gmail or something like that. You don’t need a Windows Live ID. So I wouldn’t say that Windows Live ID is a goal, or something that we’re trying to drive in and of itself. It’s really more a means when we think it’s valuable for someone to have an account.

Now, I thought the Live ID was a single sign-on for Microsoft’s online services, and the basis of a network of friends and contacts. Perhaps Microsoft is now ceding that concept to Facebook or others? This does seem to be a move in that direction; and while it may be acceptance of something that was inevitable, it is a bad day for Microsoft’s efforts to matter online.

How infectious is the GPL? Battle of words between WordPress and Thesis

Matt Mullenweg, the creator of WordPress, is engaged in a battle of words with the maker of one of its premium themes, Chris Pearson, who runs DIYthemes and offers the Thesis theme on a paid-for basis. I listened to their discussion on Mixergy; it is ill-tempered particularly on Pearson’s side.

The issue boils down to this. WordPress is licensed under the GPL, which provides that if you derive a new work from an existing GPL-licensed work, the GPL applies to your new work as well.

Pearson argues, I think, that his work is not so tightly linked to WordPress that the GPL applies. “Thesis does not inherit anything from WordPress” he says.

Mullenweg says that the way themes interact with WordPress is such that all themes much be GPL. “If you build something on top of it, it should be GPL” he says.

Pearson is refusing to license his theme under the GPL. What is to be done – would Mullenweg go to court to protect the GPL?

“You want us to sue you? That would break my heart.” he says. Then later, “I really hope it doesn’t come to that.” Then, “If people decide the GPL doesn’t apply, it’s a serious step for open source.”

Disclosure: this site runs on WordPress and I regard Mullenweg as one of the heroes of open source. Like the Apache web server (also in action here), WordPress is among the greatest achievements of the open source community.

I have no legal expertise; though I know a little about how WordPress works. Themes link very tightly with WordPress and in most cases are built by modifying an existing GPL theme; but I guess if you could show that Pearson’s work does not do this but merely runs on WordPress, as opposed to modifying it, he may have a case. That’s the argument Michael Wasylik makes here. On the other hand, did Pearson really create his theme without including any tiny bit of GPL code?

Another factor: if you choose to build an extension to a platform like WordPress, it is arguably unwise to do something counter to the strong wishes of its founder. There are ethical as well as legal aspects to this.

It is an important discussion for the open source community.

A note to RSS subscribers

This blog has a full-text RSS feed. In other words, you can read the entire contents of a post without visiting the site – though I hope you will visit the site from time to time to read the comments, like the excellent discussion on web vs desktop applications here.

The reason for this note is that the feed broke for some subscribers recently; and the reason it broke was that I’d hacked the code to ensure that you get full text feeds and not excerpts with a “read more” link. I had hacked the code not because WordPress was broken exactly, but because of a legacy problem. The feed for this blog used to be http://www.itwriting.com/blog/rss.php. WordPress still supports this URL, but without my hack it delivers excerpts, even though WordPress is set for full text. The hack works; but it is perilous because I use Subversion to keep WordPress up-to-date. If I modify the WordPress source, and then the same file gets updated in the official source, then Subversion inserts some stuff in the file to assist in resolving the conflict. That’s fine, except that it may break the PHP until I get round to fixing it. There’s also a risk that the modified file will no longer work because of changes elsewhere.

The sane solution then is not to modify the WordPress source, but to ask you to use the modern, approved and up-to-date RSS feed URLs which are:

http://www.itwriting.com/blog/feed for RSS

and

http://www.itwriting.com/blog/feed/atom

for Atom.

If you use Google Reader, for example, I suggest you remove the existing subscription and add a new one with one of the above URLs.

That said, the old URL now works again, but with excerpts and not full text. The reason is not that I want you to visit the site, add to my page views and enjoy the unobtrusive advertising (though I do); it’s because of the technical issue above. Now you know how to fix it.

Fixing a WordPress plugin setting

I changed the theme and plugins used on this blog recently. Along the way I managed to slightly corrupt the settings for one of the plugins, GD Star Rating, the result being that the stars in the Top Rated Posts widget would not display. I figured out the problem: the plugin stores the path to the graphics which represent the stars, and this had incorrectly been set to an https path. Since I use a self-generated SSL certificate, the result was that browsers did not trust the connection and refused to display the graphics.

Unfortunately this path is not configured directly in the plugin options, as far I can see. I temporarily changed it to display a text rating while I worked out how to fix it.

The setting had to be in the MySQL database somewhere; and I found it. It is one value in a massive 10,000 character field called  option_value, in the main options table. It seems that most of the settings for the plugin live in this single colon-separated field, even though the plugin also creates 12 tables of its own for the ratings data. Hmm, I don’t like the way this implemented. How often does this field get queried and parsed?

Still, the immediate problem was to alter the value. I ran up the MySQL interactive SQL utility and typed very carefully. This is where one false move can obliterate your WordPress install; I’m reminded of someone I knew (not me, honest) who set all his company’s customers to have the same address with a careless update missing its WHERE clause. Fortunately this is only a blog. Transactions are also good. Anyway, what could go wrong? it was a simple combination of UPDATE, REPLACE and WHERE.

It worked, the stars have returned, and I know a little bit more about the innards of WordPress and this particular plugin.

Going Mobile

In the back of my mind I knew that this blog looked terrible on a mobile, but I did nothing about it until @monkchips complained that it was unreadable on his HTC Magic, which runs Google Android 1.6.

I don’t have an Android device, but I grabbed the SDK, ran up the emulator, and had a look. The page took ages to load, and did not work properly even when fully loaded.

I figured “there’s a plugin for that”, and there is – several in fact. I settled on the WordPress Mobile Pack. Installed, configured, and a short time later was up and running.

I had a few hassles, mainly because most of my wordpress installation is not writeable by the web server, and this plugin needs to write themes on installation and temporary images after that, so I had to loosen permissions slightly. I then set the themes directory back to read-only, and configured the cache so that Apache will only serve images.

I still only get a score of Fair (2 fails) from the MobiReady report. Still, progress. I am ahead of bbc.co.uk which gets Bad (10 fails); but behind microsoft.com which rates Good (0 fails).

The plugin also tells me that 5% of the traffic to this site is from mobile users. More than I had expected.

Beep beep.

Seven years of blogging, and a redesign

This blog began in 2003, though the website goes back to 2000, and I now see little difference between what is now a blog, and what in 2000 was a more painful process of authoring web content, especially with the decline of RSS readers. Still, my first blogging efforts were powered by a now-defunct project called bblog. I modified this heavily to add features and cope with comment spam – almost non-existent in 2003 – and then in 2006 accepted that I would be better off with a mainstream blog engine and selected WordPress, which has exceeded my expectations.

When I moved to WordPress I picked a theme which met my requirements, then modified it to tidy up the layout and to support non-intrusive advertising. I found myself to some extent boxed in once again, since I could not change or upgrade the theme without losing my modifications. This also meant I was missing out on newer features of WordPress. Widget support is a breakthrough feature, letting you add features to the site through a simple drag-and-drop admin page, but I could not use them. I also wanted to support gravatars, which show an image chosen by the author alongside their comments, and to add a ratings system.

Ratings are a lot of fun, though not really reliable as a gauge of quality. If your article extolling the merits of the Xbox 360 gets linked by a PlayStation fan site, or your article critical of Apple gets linked by an Apple fan site, there is little chance of a fair rating. Some readers also find it difficult to separate what they think about the subject matter from what they think about the quality of reporting. Even so, ratings are always interesting and I’d like to include a list of best-rated posts.

It has taken me some time to find a theme that looked right for my needs, but I have now settled on Atahualpa from BytesForAll. It is a popular theme, so my blog will look similar to many others, but it is flexible and I’ve been able to add the most important features by modifying settings rather than editing the raw PHP, a critical issue for upgradability. I’ve also added rating support with GD Star Rating.

As ever, it is work in progress, and I expect to modify the design and add features as time allows. Although it may not look much improved yet, it is much easier to modify in a maintainable fashion, so expect more changes soon.