<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Stuart Hardy &#187; WordPress</title>
	<atom:link href="http://www.stuarthardy.com/category/web/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stuarthardy.com</link>
	<description>London-based Web and IT consultant</description>
	<lastBuildDate>Wed, 14 Sep 2011 11:31:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>WordPress 2.8.4 upgrade</title>
		<link>http://www.stuarthardy.com/2009/09/08/wordpress-2-8-4-upgrade/</link>
		<comments>http://www.stuarthardy.com/2009/09/08/wordpress-2-8-4-upgrade/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 08:59:55 +0000</pubDate>
		<dc:creator>Stuart</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.stuarthardy.com/?p=70</guid>
		<description><![CDATA[I spent most of Sunday and much of yesterday upgrading all of the WordPress installations that I&#8217;m responsible for, following the news that an internet worm is trawling the web looking for sites with security vulnerabilities.  The scale of this particular attack is considerable, because the worm targets all versions prior to the current 2.8.4, [...]]]></description>
			<content:encoded><![CDATA[<p>I spent most of Sunday and much of yesterday upgrading all of the WordPress installations that I&#8217;m responsible for, following the news that an internet worm is trawling the web looking for sites with security vulnerabilities.  The scale of this particular attack is considerable, because the worm targets <strong>all </strong>versions prior to the current 2.8.4, which was only released on 11 August &#8211; less than a month ago.  A friend had already had one of her sites hacked and I&#8217;ve since read about others I know who&#8217;ve been affected.</p>
<p>When I first heard about this issue, I was a bit slow to get to grips with its urgency and vaguely planned to do the upgrades &#8220;sometime&#8221; this week.  The hacked friend urged me to take it much more seriously.  Now I&#8217;m reading some of the horror stories of people trying to fix their hacked sites, I&#8217;m so glad she made the effort.  At the risk of sounding like a latecoming evangelist, I&#8217;m going to repeat the warning.  <strong>Don&#8217;t wait &#8211; do it now</strong>.  Lorelle provides the best <a href="http://lorelle.wordpress.com/2009/09/04/old-wordpress-versions-under-attack/">summary</a> that I&#8217;ve read about this.</p>
<p>My newest client site, which is still at the pre-live stage, was already on version 2.8.4.  All of the rest were at various version levels: 2.3.x, 2.5.x, 2.6.x and 2.7.x.  Some of them hadn&#8217;t been upgraded because there had been no pressing need for clients to engage me to do so, some because they depended on plugins that weren&#8217;t compatible with 2.8 and some because of pure inertia.  I was a little daunted by having to upgrade so many sites so quickly, but in the end everything went relatively smoothly.</p>
<p>The biggest technical issue that I encountered was that some of the files in one particular installation were owned by the web server, rather than by my account.  This meant that I couldn&#8217;t delete them prior to the upgrade.  I was rather puzzled by this, because other installations on the same server didn&#8217;t have the problem.  The solution in the end was to run a custom Unix shell script via CGI.  It was very quick and dirty, with no error checking.  This is what it looked like:</p>
<pre>#!/bin/sh
/bin/rm -rf /usr/www/users/[account name]/path/to/some/files/*
/bin/rm -rf /usr/www/users/[account name]/path/to/other/files/*
 echo "Content-type: text/html"
 echo ""
 echo "&lt;html&gt;&lt;head&gt;&lt;title&gt;Deletion script&lt;/title&gt;&lt;/head&gt;&lt;body&gt;"
 echo "&lt;p&gt;script has run&lt;/p&gt;"
 echo "&lt;/body&gt;&lt;/html&gt;"
exit</pre>
<p>I put it into the cgi-bin directory for that particular website, changed its permissions to make it executable and then ran it.  The first time, it failed.  This was because all of the end-of-line characters had changed to ^M in the process of transferring the file from my PC to the Unix host.  A quick spot of editing in <em>vi</em>, the Unix editor, soon sorted this out.  After this, it ran perfectly and did exactly what it was supposed to.  I made sure I deleted it when I was done with it, keeping a copy for future reference.</p>
<p>As far as WordPress plugins were concerned, I feared the worst and was pleasantly surprised.  When I&#8217;d last scouted around towards the end of July to check plugin compatibility with 2.8, few of the ones that I use were formally supported.  Since then, presumably due to the focus on the pre-2.8.4 security issues, every single one is now entirely compatible with the latest version.  Nothing broke on any of my sites.  Now they&#8217;re all done, I have that feeling of contentment that comes from a good spring-clean.</p>
<p><strong>Update:</strong> a week later, everything&#8217;s still going strong.  Only one issue emerged on one site after a couple of days.  In upgrading to the latest version of the <a href="http://wordpress.org/extend/plugins/twitter-tools/">Twitter Tools</a> plugin, I failed to spot that you now need a bit.ly account and API key if you want the plugin to auto-generate links to blog posts in the &#8220;tweets&#8221; that it creates.  Easily remedied, it took less than five minutes to sort out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stuarthardy.com/2009/09/08/wordpress-2-8-4-upgrade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

