<?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>geniosity</title>
	<atom:link href="http://www.geniosity.co.za/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.geniosity.co.za</link>
	<description>a place of wonder and geekery...</description>
	<lastBuildDate>Mon, 04 Feb 2013 16:25:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>www.GMail.co.za is NOT Google GMail &#8211; WARNING</title>
		<link>http://www.geniosity.co.za/musings/google/www-gmail-co-za-is-not-google-gmail-warning/</link>
		<comments>http://www.geniosity.co.za/musings/google/www-gmail-co-za-is-not-google-gmail-warning/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 08:23:00 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://www.geniosity.co.za/?p=347</guid>
		<description><![CDATA[This is a short notice to say that www.gmail.co.za is N [...]]]></description>
				<content:encoded><![CDATA[<p>This is a short notice to say that <a title="GMail" href="http://www.geniosity.co.za/musings/google/gmail-unread-mail-shortcut/">www.gmail.co.za</a> is <strong>NOT Google&#8217;s GMail</strong>.</p>
<h3>GMail is obviously not GMail!</h3>
<p>You&#8217;re probably asking yourself why you care, and why I&#8217;m stating something that could be obvious?</p>
<p>Well, because to a LOT of people, it&#8217;s NOT obvious.</p>
<p><span id="more-347"></span>In fact, to any normal techie, it&#8217;s a head-slapping problem. Non-techie visitors to THIS site, <strong>which in my mind looks NOTHING LIKE GMAIL</strong>, are STILL trying to log into GMail using the search box. They&#8217;ve just searched for something like &#8220;<em><strong>GMail Login Page</strong></em>&#8221; and land on this website. Then, without thinking, try and log into GMail here.</p>
<p>I&#8217;ve got quite a few search results in my site stats with email addresses. <img src='http://www.geniosity.co.za/genwp/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>That sounds dumb, right. Now, imagine how many usernames and passwords gmail.co.za is getting?</p>
<p>I REALLY hope they&#8217;re responsible, and don&#8217;t decide to use that information for evil!</p>
<p>By the way, for those readers who are wondering, the correct address is www.gmail.com</p>
<h3>How YOU can help!</h3>
<p>Link to this article, spread the word, or something like that. <img src='http://www.geniosity.co.za/genwp/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Yes, it sounds selfish, but so many times I feel like I am really glad that I am the owner of a specific website, because I could defraud a LOT of people out of a LOT of money if I were evil.</p>
<p>But I&#8217;m not, and I hope you&#8217;re not either.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geniosity.co.za/musings/google/www-gmail-co-za-is-not-google-gmail-warning/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Why geniosity goes unappreciated at work!</title>
		<link>http://www.geniosity.co.za/musings/funny/why-geniosity-goes-unappreciated-at-work/</link>
		<comments>http://www.geniosity.co.za/musings/funny/why-geniosity-goes-unappreciated-at-work/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 16:05:07 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[funny]]></category>

		<guid isPermaLink="false">http://www.geniosity.co.za/?p=327</guid>
		<description><![CDATA[Here&#8217;s a moment of enlightenment from my favourit [...]]]></description>
				<content:encoded><![CDATA[<p>Here&#8217;s a moment of enlightenment from my favourite comic at <a title="geniosity is unappreciated at work" href="http://xkcd.com/664/">XKCD.com</a></p>
<p>(<em>click to enlarge</em>)</p>
<p><a rel="attachment wp-att-328" href="http://www.geniosity.co.za/genwp/wp-content/uploads/2009/11/academia_vs_business.png"><img class="aligncenter size-medium wp-image-328" title="geniosity in academia vs business" src="http://www.geniosity.co.za/genwp/wp-content/uploads/2009/11/academia_vs_business-300x154.png" alt="geniosity in academia vs business" width="300" height="154" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geniosity.co.za/musings/funny/why-geniosity-goes-unappreciated-at-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generic Stats WordPress Plugin on version 1.2</title>
		<link>http://www.geniosity.co.za/musings/wordpress/generic-stats-wordpress-plugin-on-version-1-2/</link>
		<comments>http://www.geniosity.co.za/musings/wordpress/generic-stats-wordpress-plugin-on-version-1-2/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 21:11:29 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.geniosity.co.za/?p=325</guid>
		<description><![CDATA[Just another short little note to say that the Generic  [...]]]></description>
				<content:encoded><![CDATA[<p>Just another short little note to say that the Generic Stats plugin has been upgraded.</p>
<p>There are no MAJOR changes.</p>
<p>Here are the changes that HAVE been made:</p>
<ul>
<li>* Updated look &amp; feel of admin page</li>
<li>* Changed to use new &#8220;get options&#8221; methods</li>
<li>* Added pretty little &#8220;Plugin Appreciation&#8221; box on the Admin page</li>
<li>* Updated links to the plugin&#8217;s pages</li>
</ul>
<p>Go read more about this plugin here:</p>
<p><a title="WordPress Plugin: Generic Stats" href="http://www.geniosity.co.za/tools/wordpress-hacks/generic-statistics-wordpress-plugin/">Generic Stats Plugin</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geniosity.co.za/musings/wordpress/generic-stats-wordpress-plugin-on-version-1-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Please Link 2 Me Plugin updated to version 1.5</title>
		<link>http://www.geniosity.co.za/musings/wordpress/please-link-2-me-plugin-updated-to-version-1-5/</link>
		<comments>http://www.geniosity.co.za/musings/wordpress/please-link-2-me-plugin-updated-to-version-1-5/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 22:41:19 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.geniosity.co.za/?p=316</guid>
		<description><![CDATA[So, just a short post to say that the &#8220;Please Lin [...]]]></description>
				<content:encoded><![CDATA[<p>So, just a short post to say that the &#8220;Please Link 2 Me&#8221; WordPress plugin has been updated to version 1.5</p>
<p>Here&#8217;s a copy of the &#8220;changelog&#8221; section in the readme.txt:</p>
<blockquote><p>= 1.5 =<br />
* 2009/11/01<br />
* Fixed changelog</p>
<p>= 1.4 =<br />
* 2009/11/01<br />
* Recoded to use new Options methods<br />
* Changed look &amp; feel of admin section<br />
* Added option to modify size of TextArea (the box for link code)<br />
* Changed main URLs for the plugin<br />
* Added ability to add the box to a Page</p></blockquote>
<p>I had 2 updates today because I had a copy/paste issue with the documentation. It&#8217;s been a long day.</p>
<p>You can read more about it the plugin here: <a title="WordPress plugin: Please Link 2 Me" href="http://www.geniosity.co.za/tools/wordpress-hacks/please-link-2-me-wordpress-plugin/">Please Link 2 Me WordPress Plugin</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geniosity.co.za/musings/wordpress/please-link-2-me-plugin-updated-to-version-1-5/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>May the 4th be with you!</title>
		<link>http://www.geniosity.co.za/musings/funny/may-the-4th-be-with-you/</link>
		<comments>http://www.geniosity.co.za/musings/funny/may-the-4th-be-with-you/#comments</comments>
		<pubDate>Mon, 04 May 2009 13:33:57 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[funny]]></category>

		<guid isPermaLink="false">http://www.geniosity.co.za/?p=308</guid>
		<description><![CDATA[]]></description>
				<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-307" title="May the force be with you!" src="http://www.geniosity.co.za/genwp/wp-content/uploads/2009/05/the-force.jpg" alt="May the force be with you!" width="199" height="393" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geniosity.co.za/musings/funny/may-the-4th-be-with-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EXCLUSIVE: Google Buys WordPress!</title>
		<link>http://www.geniosity.co.za/musings/interesting/exclusive-google-buys-wordpress/</link>
		<comments>http://www.geniosity.co.za/musings/interesting/exclusive-google-buys-wordpress/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 05:47:42 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[interesting]]></category>

		<guid isPermaLink="false">http://www.geniosity.co.za/?p=293</guid>
		<description><![CDATA[This was obviously an attempt at an April Fool&#8217;s  [...]]]></description>
				<content:encoded><![CDATA[<p><em>This was obviously an attempt at an April Fool&#8217;s Joke. I must say, I&#8217;m quite impressed with my WordPress/Google Logo <img src='http://www.geniosity.co.za/genwp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </em></p>
<p><img class="alignright size-full wp-image-292" style="background: #ffffff" title="Google Buys WordPress!" src="http://www.geniosity.co.za/genwp/wp-content/uploads/2009/03/google-buys-wordpress.png" alt="Google Buys WordPress!" width="175" height="175" />I was chatting to my cousin a couple of hours ago via IM, and he let slip about the news that <a title="Automattic" href="http://automattic.com">Automattic</a> had sold off <a title="WordPress" href="http://www.wordpress.org">WordPress</a> to <a title="Google!" href="http://www.google.com">Google</a>.</p>
<p>He knows this because he works with <a title="Matt Mullenweg" href="http://ma.tt">Matt Mullenweg</a>, but he obviously doesn&#8217;t want me to &#8220;reveal his name&#8221; until the news is made public (which is going to happen in a few hours time apparently). So, for the purpose of this post, let&#8217;s call him Byron.</p>
<p>I asked if he minded if I copied and pasted a part of our conversation about it and he said he didn&#8217;t mind because the news would be released later today anyway. (I&#8217;m guessing it has something to do with the fact that by the time anybody reads my blog, it will have been announced already).</p>
<p><span id="more-293"></span></p>
<blockquote><p><strong>geniosity <span style="font-weight: normal; ">[09:40 PM]:</span></strong></p>
<p><strong><span style="font-weight: normal; ">So, how much did Matt sell it for?!</span></strong></p>
<p><strong>Byron<span style="font-weight: normal; "> <span>[09:40 PM]:</span></span></strong></p>
<p><strong><span style="font-weight: normal; "><span> Sorry, can&#8217;t say that just yet <img src='http://www.geniosity.co.za/genwp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  . But let&#8217;s just say he&#8217;ll be able to buy that Jazz band he always talks about starting. It wasn&#8217;t quite a YouTube deal&#8230; Or maybe it was.</span></span></strong></p>
<div>
<p><strong>geniosity <span style="font-weight: normal;">[09:42 PM]:</span></strong></p>
<p>Who approached who?</p>
<p><strong>Byron</strong><span style="font-weight: normal; "> <span>[09:43 PM]:</span></span></p>
<p>Google approached us. We mentioned that they didn&#8217;t need to buy it, because it&#8217;s not like we&#8217;re in it for the money, but they said that it would be better for their image if they owned the world&#8217;s most popular blogging software.</p>
<p>They were just tired of everybody complaining about the <a title="Blogger" href="http://www.blogger.com/">Blogger</a> platform. It crashes, it&#8217;s insecure, and it&#8217;s just not as cool as WordPress. So they decided to throw in the towel. Don&#8217;t quote me on this, (ok, quote me <img src='http://www.geniosity.co.za/genwp/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ) but even <strong>Evan Williams</strong> (<em>of <a title="twitter" href="http://twitter.com">Twitter</a> fame and the creator of &#8220;Blogger&#8221;</em>) is embarrassed at the state of Blogger.</p>
<div>
<p><strong>geniosity</strong> <span style="font-weight: normal; ">[09:44 PM]:</span></p>
<p>So will they be moving all blogger blogs to the WordPress platform?</p>
<p><strong>Byron</strong><span style="font-weight: normal; "> <span>[09:44 PM]:</span></span></p>
<p>That <em>will</em> eventually happen. It will take a couple of months, but thanks to the great WordPress community, there&#8217;s already a Blogger importer, so it will just be a case of converting all the boring themes on Blogspot into WP themes, and then ironing out a few of the minor &#8220;missing features&#8221; in the importer, and they&#8217;ll be good to go.</p>
<div>
<p><strong>geniosity</strong> <span style="font-weight: normal; ">[09:45 PM]:</span></p>
<p>What&#8217;ll happen to the Automattic team?</p>
<p><strong>Byron</strong><span style="font-weight: normal; "> <span>[09:46 PM]:</span></span></p>
<p>Well, we&#8217;ve still got other software that we can focus on. We&#8217;ll be working out of the Googleplex, so there&#8217;ll be free food (for a few months at least, because I hear they&#8217;re planning on limiting that due to the current global financial crisis).</p>
<div>
<p><strong>geniosity</strong> <span style="font-weight: normal; ">[09:47 PM]:</span></p>
<p>And did u get anything from this.</p>
<p><strong>Byron</strong><span style="font-weight: normal; "> <span>[09:48 PM]:</span></span></p>
<p>he he he&#8230; I did, and I&#8217;m REALLY happy with it&#8230;</p>
<p><strong>geniosity</strong> <span style="font-weight: normal; ">[09:48 PM]:</span></p>
<p>When&#8217;s it going to be announced?</p>
<p><strong>Byron</strong><span style="font-weight: normal; "> <span>[09:49 PM]:</span></span></p>
<p>Should be in the next few hours. You&#8217;ll probably see something on <strong>Matt Cutt&#8217;s</strong> blog some time on Wednesday morning because he&#8217;s also pretty excited about it. But we&#8217;ll see what he says. (Especially since he already uses WordPress for his blog).</div>
</div>
</div>
</div>
</blockquote>
<p>So, there&#8217; you have it. Was quite an interesting IM conversation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geniosity.co.za/musings/interesting/exclusive-google-buys-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hotlink 2 Link Plugin</title>
		<link>http://www.geniosity.co.za/tools/wordpress-hacks/hotlink-2-link-plugin/</link>
		<comments>http://www.geniosity.co.za/tools/wordpress-hacks/hotlink-2-link-plugin/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 11:17:37 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[WordPress Hacks]]></category>

		<guid isPermaLink="false">http://www.geniosity.co.za/genwp/?p=277</guid>
		<description><![CDATA[Here is my latest WordPress plugin &#8211; Hotlink 2 Li [...]]]></description>
				<content:encoded><![CDATA[<p>Here is my latest WordPress plugin &#8211; <strong>Hotlink 2 Link for WordPress</strong></p>
<p>This plugin will show a popup window if somebody right-clicks on an image and asks them to use specific code which will link to your article.</p>
<p>Below is an image example.</p>
<p><img class="size-full wp-image-188 alignnone" title="Benefit from hotlinking in WordPress" src="http://www.geniosity.co.za/genwp/wp-content/uploads/2008/06/benefit-from-hotlinking-in-wordpress.png" alt="Benefit from hotlinking in WordPress" width="300" height="303" /></p>
<p>You can read more about this on my blog post:</p>
<p><a title="Hotlink 2 Link WordPress Plugin" href="../../musings/wordpress/hotlink-2-link-wordpress-plugin/">Hotlink 2 Link WordPress Plugin</a></p>
<p>This plugin is based on and uses the JavaScript widget &#8220;<a title="LinkMyPics Hotlinking JavaScript Widget" href="http://www.funscripts.net/javascript-widgets/">LinkMyPics</a>&#8220;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geniosity.co.za/tools/wordpress-hacks/hotlink-2-link-plugin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Generic Statistics WordPress plugin</title>
		<link>http://www.geniosity.co.za/tools/wordpress-hacks/generic-statistics-wordpress-plugin/</link>
		<comments>http://www.geniosity.co.za/tools/wordpress-hacks/generic-statistics-wordpress-plugin/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 10:51:03 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[WordPress Hacks]]></category>

		<guid isPermaLink="false">http://www.geniosity.co.za/genwp/?p=272</guid>
		<description><![CDATA[Do you have the urge to SPY on your visitors? The Gener [...]]]></description>
				<content:encoded><![CDATA[<div class="content clear-block">
<h3>Do you have the <em>urge</em> to SPY on your visitors?</h3>
<p>The <strong>Generic Stats WordPress Plugin</strong> is a plugin that allows you to add any statistics tracking code to your WordPress blog without having to edit your WordPress Template&#8217;s code.</p>
<p>What does this have to do with <strong>spying on your website&#8217;s visitors</strong>? Well, you could easily <span style="text-decoration: underline;"><strong><a class="clicky_log_outbound piwik_link" title="Performancing Metrics Statistics Sign Up" href="http://www.geniosity.co.za/recommends/pmetrics-statistics" target="_blank">sign up for the Performancing Metrics statistics service</a></strong></span>, and EASILY let you add the statistics tracking code to your blog, without you needing to change ANYTHING ELSE on your site.</p>
<p>This plugin also allows you to specify whether you&#8217;d like the code to be place at the top of your page (before the &lt;body&gt; tag) or at the bottom of the page (just after or just before the closing &lt;/body&gt; tag).</p>
<p>This option is due to the fact that some statistics packages, like Google Analytics, prefer that you place the statistics tracking scripts at the top of the page, whereas it is actually recommended that you place all external scripts (external to your site) at the bottom.</p>
<p>The reason it&#8217;s better to place the code at the bottom is just in case the external site is down, it won&#8217;t prevent your site from loading.</p>
<p>Click on the image at the below to see what the plugin looks like on the admin side:</p>
<p><a href="http://www.geniosity.co.za/genwp/wp-content/uploads/2009/02/screenshot-1.png"><img class="aligncenter size-thumbnail wp-image-322" title="Generic Stats WordPress plugin Admin Page" src="http://www.geniosity.co.za/genwp/wp-content/uploads/2009/02/screenshot-1-150x150.png" alt="Generic Stats WordPress plugin Admin Page" width="150" height="150" /></a></p>
<p><a title="Generic Stats Download" href="http://wordpress.org/extend/plugins/generic-stats/" target="_blank"><strong>Click here to download the plugin</strong></a></p>
<p>To be kept aware of updates, please subscribe to the comments feed on this page.</p>
<p>Oh, and <span style="text-decoration: underline;"><a class="clicky_log_outbound piwik_link" title="PMetrics Statistics Sign Up" href="http://www.geniosity.co.za/recommends/pmetrics-statistics">Click Here to sign up and try out Performancing Metrics</a></span>. You will SERIOUSLY get addicted to watching your visitors moving around your site, IN REAL TIME!</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.geniosity.co.za/tools/wordpress-hacks/generic-statistics-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Checking Domain Availability</title>
		<link>http://www.geniosity.co.za/tools/internet-utilities/checking-domain-availability/</link>
		<comments>http://www.geniosity.co.za/tools/internet-utilities/checking-domain-availability/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 10:47:54 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Internet Utilities]]></category>

		<guid isPermaLink="false">http://www.geniosity.co.za/genwp/?p=269</guid>
		<description><![CDATA[Don&#8217;t Alert Others of your Ideas! There is one MA [...]]]></description>
				<content:encoded><![CDATA[<div class="content clear-block">
<h3>Don&#8217;t Alert Others of your Ideas!</h3>
<p>There is one MAIN thing you want to be careful of when checking to see if a <strong>domain is available</strong> or not, and that is alerting others that somebody is searching for it.</p>
<p>You see, there are some people who monitor searches for domains so that they can quickly register the domain in the hope that you will buy it from them at more than they paid for it.</p>
<p>A good way to prevent this is to use tools available from respected and well known Domain Registrars, such as GoDaddy and Moniker.com.</p>
<h3>Tools to help you</h3>
<p>To facilitate this (because I register domains quite often now, IT&#8217;S A DRUG I TELL YOU!) I have created to search tools that you can install if you use IE7 (Internet Explorer 7) or FireFox web browsers.</p>
<p>You will then be able to just type the domain that you want to check it&#8217;s availability of, and press enter.</p>
<p>To install these &#8220;search engines&#8221;, just click on the &#8220;down arrow&#8221; at the top right of your browser and click on the &#8220;<strong>Add DomainCheck</strong>&#8220;. This Search Engine will use Moniker.com&#8217;s Domain checking service to see if a domain is available to be registered.</p>
<p>The reason I use Moniker.com is because it can check more than one TLD at a time, for example, if you type in &#8220;james&#8221; (without the quotes) and click on the magnifying glass, the Moniker.com results will show you the results for james.com, james.info, james.org, etc. etc. etc&#8230;</p>
<p>You might have also noticed the ability to add the &#8220;<strong>CoZaDomains</strong>&#8221; Search Engine.</p>
<p>This search engine will check the availability of &#8220;<strong>.co.za</strong>&#8221; (South African) domains, using the tool provided by <strong><a href="http://www.anno.co.za/?coupon=geniosity">www.anno.co.za</a></strong> (the site that hosts my website).</p>
<p>Anyway, let me know if you find these tools useful&#8230;</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geniosity.co.za/tools/internet-utilities/checking-domain-availability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shell Script for Automating WordPress updates for multiple blogs</title>
		<link>http://www.geniosity.co.za/musings/wordpress/shell-script-automate-wordpress-updates-for-multiple-blogs/</link>
		<comments>http://www.geniosity.co.za/musings/wordpress/shell-script-automate-wordpress-updates-for-multiple-blogs/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 09:55:11 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.geniosity.co.za/musings/?p=250</guid>
		<description><![CDATA[Many moons ago I read Joost de Valk&#8217;s blog post a [...]]]></description>
				<content:encoded><![CDATA[<p>Many moons ago I read Joost de Valk&#8217;s blog post about <a href="http://yoast.com/upgrading-and-installing-wordpress-from-subversion/">upgrading and installing WordPress from SVN</a>. Since then, every blog I maintain I use the WordPress svn repository to check out, and to update using the simple command of &#8220;<strong>svn sw</strong>&#8220;.</p>
<p>But even with that ease, it can get a bit tedious to upgrade 10 blogs, for instance.</p>
<p>So, as all &#8220;script writers&#8221; that are in between TV Series do, I wrote a script to automate this.<br />
<span id="more-250"></span><br />
To run this script, there are 2 critical requirements:</p>
<p>- You have access to the command line on your server (SSH access)</p>
<p>- Your WordPress directories were checked out of SVN, and so contain all the required &#8220;.svn&#8221; directories.</p>
<p>So, just in time for WordPress 2.7, which has the ability to update at the click of a button from the admin panel, here&#8217;s my script.</p>
<p>A basic rundown of what it does:</p>
<p>- Reads through a text file that you need to create containing the following 3 pieces of info, separated by colons (:)</p>
<ol>
<li> Your site URL without http://. Example: www.geniosity.co.za/musings</li>
<li> The directory your site is in. Example: /path/to/your/site/dir/home/james123/public_html/musings</li>
<li> The first part of the tar file name that will be created with your backup. Example: mus</li>
</ol>
<p>Here&#8217;s what it might look like with the above info:</p>
<p><em>www.geniosity.co.za/musings:/home/james123/public_html/musings:mus</em></p>
<h3>Setup and Execution of the script</h3>
<p>So, your steps to getting this to run successfully are:</p>
<p>1 &#8211; Create the text file containing a list of all your sites and their relevent directories, in the above format. 1 record per site.</p>
<p>2 &#8211; Copy the script below to a relevant directory on your server, and give it executable permissions</p>
<p>3 &#8211; Read the &#8220;<strong>INITIAL SETUP</strong>&#8221; section just below &#8220;<em>YOU MUST CHANGE THESE SETTINGS</em>&#8221; near the top of the script, and create any directories that are needed in this section.</p>
<p>4 &#8211; Update the section where it says &#8220;<em>YOU MUST CHANGE THESE SETTINGS</em>&#8221; with the directories and variabls that are required.</p>
<p>5 &#8211; Run the script. I recommend using the following command:</p>
<p><strong>nohup scriptname.sh &#038;</strong></p>
<p>This will run it in the background, and if you get disconnected for some reason while it&#8217;s running, it will continue in the background.</p>
<h3>The benefits of this script</h3>
<p>The 2 main benefits of this script are:</p>
<p>- Speed and ease of upgrading multiple blogs. As <a href="http://ma.tt">Matt Mullenweg</a> mentioned on a <a href="http://wp-community.org/2008/10/17/episode-45-matt-mullenweg-interview-automattic-acquires-intense-debate-discussion-of-wordcamps/">WordPress Podcast episode</a> while being interviewed by <a href="http://wp-community.org/">Charles Stricklin</a>, if it takes you more than 2 minutes to upgrade your blog, there&#8217;s a problem.</p>
<p>- The second benefit is that this script sends you an email when it completes with the log files generated, as well as the Upgrade Link so you can just click it to upgrade the Database if required.</p>
<h3>Other notes on this script</h3>
<p>Please note, this script does NOT upgrade or backup your blog&#8217;s database. I recommend the &#8220;<a href="http://www.ilfilosofo.com/blog/wp-db-backup">WordPress Database Backup</a>&#8221; Plugin for that.</p>
<p>Also, I cannot guarantee it works for you. As I mentioned, I have tried this on 2 different servers with 2 different hosts, and it worked 100% there. But, for safety&#8217;s sake, do a manual backup the first time to ensure it all goes as planned.</p>
<p>And, if you&#8217;re wondering why I have all the extra brackets in the script, it&#8217;s because of the cool code-folding capabilities in <a href="http://www.jedit.org">jEdit, <a href="http://www.geniosity.co.za/musings/tags/jedit/">the Programmer&#8217;sText editor I use</a>. For a screen shot of this, take a look at the bottom of this post.</p>
<h3>The WordPress Upgrade Script</h3>
<p>If you have any changes or recommendations, feel free to let me know in the comments.</p>
<pre lang="bash">#!/bin/bash
################################################################################

#                                                                              #
#{--------------------------   wpUpgrade.sh   -------------------------------- #
#                                                                              #
# This script will go through a list of your WordPress websites that are       #
#  hosted on the same server, and update them using SVN (if they were initially#
#  installed using SVN).                                                       #
#                                                                              #
# Please ensure that you have set the carious Variables in the INITIAL SETUP   #
#  section.                                                                    #
#                                                                              #
# The SITE_INFO variable must point to a text file containing records in the   #
#  following format separated by colons (":")                                  #
#                                                                              #
# www.yoursite.com:/path/to/your/site/dir:filename                             #
#                                                                              #
# For example:                                                                 #
#                                                                              #
# www.geniosity.co.za/musings:/home/james123/public_html/musings:musings       #
#                                                                              #
# The last field is the first part of the tar file name that will be generated.#
# For example: musings.20081024_1233.tar.bz2                                   #
#                                                                              #
#                                                                              #
#==============================================================================#
#                                                                              #
#                          MODIFICATION LOG                                    #
#                                                                              #
#  DATE       DEVELOPER  VERSION  DESCRIPTION                                  #
# ---------- ----------- -------- -------------------------------------------- #
# 2008/10/24 J. McMullan          Script Written.                              #
#                                                                              #
##############################################################################}#
################################################################################
#{--- INITIAL SETUP...
#----------------------
#--- YOU MUST CHANGE THESE SETTINGS
#------

#- The version of WordPress you are upgrading to
#- Example: "2.6.5"
NEW_VERSION_OF_WORDPRESS="2.6.5"

#- A temporary location for script output
#- Example: /home/userid/tmp
TEMP_DIR=/home/geniosit/tmp

#- A Directory where you want to place the backup files created
#- Example: /home/userid/backups
BACKUP_DIR=/home/geniosit/backups

#- A Directory where this script will output the logs
#- Example: /home/userid/logoutput
LOGS_DIR=/home/geniosit/scriptsoutput

#- The text file containing the list of WordPress sites and their directories
#- Example: /home/userid/scripts/wpsites.txt
SITE_INFO=/home/geniosit/scripts/wpdirs.txt

#- The email address where you will receive your messages from the script
EMAIL_ADDRESS="geniosity@gmail.com"

#- If you want to skip making backups (NOT recommended), change this to TRUE
SKIP_BACKUPS=FALSE

#------
#}--- END INITIAL SETUP...
################################################################################

################################################################################
#==== YOU DON'T NEED TO CHANGE ANYTHING PAST THIS POINT
#=======================================================
################################################################################
#{--- VARIABLES
#------

#------------------
#{General Variables
#---
THIS_SCRIPT_NAME=`basename $0`
RIGHT_NOW=`date +%Y%m%d_%H%M%S`
LOG_FILE=$LOGS_DIR/$THIS_SCRIPT_NAME.$RIGHT_NOW.log
WORDPRESS_SVN_DIRECTORY="http://svn.automattic.com/wordpress/tags"

#}----------------------------
#------------------
#{ERROR Variables
#---

errorLocation=
errorCode=
errorMessage=

#}----------------------------

#------------------------
#--- END VARIABLES SETUP
#}----------------------------
################################################################################

################################################################################
#{--- FUNCTIONS
#------

#-----------------------------------------------------
# Functions for logging output
#----------

function logtext {
    RIGHT_NOW=`date +%Y%m%d_%H%M%S`
    echo "$RIGHT_NOW: $1" | tee --append $LOG_FILE
}

function logsep {
    echo "--------------------------------------------"  | tee --append $LOG_FILE
}

#-----------------------------------------------------
# Functions for sending mails
#----------

function setupMailEnv {
    logtext "In Function: setupMailEnv"
    TEMP_MAIL_FILE=$TEMP_DIR/$THIS_SCRIPT_NAME.mail
    >$TEMP_MAIL_FILE
}

function createMailFile {
    logtext "In Function: createMailFile"
    MAIL_DATE_TIME=`date +%Y%m%d_%H%S`
    echo "$MAIL_DATE_TIME: $*" >> $TEMP_MAIL_FILE
}

function sendTheMail {
    logtext "In Function: sendTheMail"
    logtext "TEMP_MAIL_FILE=$TEMP_MAIL_FILE ++ THIS_SCRIPT_NAME=$THIS_SCRIPT_NAME ++ EMAIL_ADDRESS=$EMAIL_ADDRESS"
    cat $TEMP_MAIL_FILE | mailx -s "Output from $THIS_SCRIPT_NAME" $EMAIL_ADDRESS
}

#-----------------------------------------------------
# Function to validate Required Variables
#----------
function validateRequiredVariables {
    if [[ -z $NEW_VERSION_OF_WORDPRESS ]]; then
        errorLocation="In Function: validateRequiredVariables"
        errorCode=90
        errorMessage="The NEW_VERSION_OF_WORDPRESS variable has not been set. Please ensure this is set to the latest version of WordPress."
        logSendErrorMessages
        exit $errorCode
    fi

    if [[ -z $TEMP_DIR ]]; then
        errorLocation="In Function: validateRequiredVariables"
        errorCode=91
        errorMessage="The TEMP_DIR variable has not been set. Please ensure this is set to a valid directory before proceeding."
        logSendErrorMessages
        exit $errorCode
    fi

    if [[ -z $LOGS_DIR ]]; then
        errorLocation="In Function: validateRequiredVariables"
        errorCode=92
        errorMessage="The LOGS_DIR variable has not been set. Please ensure this is set to a valid directory for the log files."
        logSendErrorMessages
        exit $errorCode
    fi

    if [[ -z $SITE_INFO ]]; then
        errorLocation="In Function: validateRequiredVariables"
        errorCode=93
        errorMessage="The SITE_INFO variable has not been set. Please ensure this is set the full path and file name for the file containing your list of sites."
        logSendErrorMessages
        exit $errorCode
    fi

    if [[ ! -s $SITE_INFO ]]; then
        errorLocation="In Function: validateRequiredVariables"
        errorCode=94
        errorMessage="It looks like you settings file is empty (or doesn't exist). Please check that the file $SITE_INFO is valid (and that the SITE_INFO variable is set correctly)."
        logSendErrorMessages
        exit $errorCode
    fi

    if [[ -z $EMAIL_ADDRESS ]]; then
        errorLocation="In Function: validateRequiredVariables"
        errorCode=95
        errorMessage="The EMAIL_ADDRESS variable has not been set. This script needs an email address to notify you when upgrades are complete or if there are any errors.."
        logSendErrorMessages
        exit $errorCode
    fi

}

#-----------------------------------------------------
# Function to log and send error message
#----------
function logSendErrorMessages {
    logtext "ISSUE IN SECTION: $errorLocation"
    logtext "ERROR CODE: $errorCode"
    logtext "ERROR MESSAGE: $errorMessage"
    setupMailEnv
    createMailFile "ISSUE IN SECTION: $errorLocation"
    createMailFile "ERROR CODE: $errorCode"
    createMailFile "ERROR MESSAGE: $errorMessage"
    sendTheMail
}

#-----------------------------------------------------
# Function to send upgrade link and message
#----------
function sendUpgradeLink {
    logtext "SITE: $WP_SITE"
    logtext "MESSAGE: UPGRADED SUCCESSFULLY!"
    logtext "UPGRADE LINK: http://$WP_SITE/wp-admin/upgrade.php"
    setupMailEnv
    createMailFile "SITE: $WP_SITE"
    createMailFile "MESSAGE: UPGRADED SUCCESSFULLY!"
    createMailFile "UPGRADE LINK: http://$WP_SITE/wp-admin/upgrade.php"
    sendTheMail
}

#-----------------------------------------------------
# Function to send the log file by mail
#----------
function sendLogFile {
    logtext "About to send log file by mail"
    setupMailEnv
    cat $LOG_FILE >> $TEMP_MAIL_FILE
    sendTheMail
}

#-----------------------------------------------------
# Function to log and send error message
#----------
function backupTheDirectory {
    logtext "In function: backupTheDirectory"

    if [[ -z $WP_DIR || -z $WP_TAR_FILE ]]; then
        errorLocation="In Function: backupTheDirectory"
        errorCode=1
        errorMessage="Variables WP_DIR and WP_TAR_FILE are not set correctly.++ WP_SITE=$WP_SITE ++ WP_DIR=$WP_DIR ++ WP_TAR_FILE=$WP_TAR_FILE ++ Ensure the settings file contains proper records"
        logSendErrorMessages
        return $errorCode
    fi

    if [[ ! -e $BACKUP_DIR ]]; then
        errorLocation="In Function: backupTheDirectory"
        errorCode=2
        errorMessage="Backup directory does not exist! Please ensure that the directory $BACKUP_DIR exists."
        logSendErrorMessages
        return $errorCode
    fi

    if [[ ! -w $BACKUP_DIR ]]; then
        errorLocation="In Function: backupTheDirectory"
        errorCode=3
        errorMessage="Backup directory is not writable! Please ensure that the directory $BACKUP_DIR has write permissions."
        logSendErrorMessages
        return $errorCode
    fi

    if [[ ! -e $LOGS_DIR ]]; then
        errorLocation="In Function: backupTheDirectory"
        errorCode=4
        errorMessage="Logs directory does not exist! Please ensure that the directory $LOGS_DIR exists."
        logSendErrorMessages
        return $errorCode
    fi

    if [[ ! -w $LOGS_DIR ]]; then
        errorLocation="In Function: backupTheDirectory"
        errorCode=5
        errorMessage="Logs directory is not writable! Please ensure that the directory $LOGS_DIR has write permissions."
        logSendErrorMessages
        return $errorCode
    fi

    if [[ ! -e $WP_DIR ]]; then
        errorLocation="In Function: backupTheDirectory"
        errorCode=6
        errorMessage="WP_DIR directory does not exist! Please ensure that the directory $WP_DIR exists."
        logSendErrorMessages
        return $errorCode
    fi

    tar cvfj $BACKUP_DIR/$WP_TAR_FILE $WP_DIR >> $LOG_FILE
    if [[ $? -gt 0 ]]; then
        errorLocation="In Function: backupTheDirectory"
        errorCode=$?
        errorMessage="Problem creating tar file.++ WP_TAR_FILE=$WP_TAR_FILE ++ WP_DIR=$WP_DIR ++ LOG_FILE=$LOG_FILE"
        logSendErrorMessages
        return $errorCode
    fi

}

#------------------------
#}--- END FUNCTIONS SETUP
################################################################################

clear
logtext "**********************************************************"
logtext "****         STARTING WORDPRESS UPDATE SCRIPT          ***"
logtext "**********************************************************"

validateRequiredVariables

for WP_RECORD in `cat $SITE_INFO`;
do
    WP_SITE=`echo $WP_RECORD | awk -F: '{print $1}'`
    WP_DIR=`echo $WP_RECORD | awk -F: '{print $2}'`
    WP_BACKUP_FILE=`echo $WP_RECORD | awk -F: '{print $3}'`
    RIGHT_NOW=`date +%Y%m%d_%H%M%S`
    WP_TAR_FILE=$WP_BACKUP_FILE.$RIGHT_NOW.tar.bz2

    logsep
    logtext "Processing site: $WP_SITE"
    logtext "Processing directory: $WP_DIR"

    if [[ $SKIP_BACKUPS != TRUE ]]; then
        logtext "About to do backup for $WP_SITE"
        logtext "tar file will be: $WP_TAR_FILE"
        backupTheDirectory
        if [[ $? -gt 0 ]]; then
            logtext "There was a problem doing the backups for site: $WP_SITE. EXITING!"
            sendLogFile
            exit $?
        fi

        logtext "Finished doing backups."
    fi

    logsep
    logtext "Starting upgrades"

    logtext "Checking the WP_DIR exists. ($WP_DIR)"
    if [[ ! -e $WP_DIR ]]; then
        errorLocation="Checking WP_DIR exists."

        errorCode=10
        errorMessage="WP_DIR directory does not exist! Please ensure that the directory $WP_DIR exists. EXITING!"
        logSendErrorMessages
        sendLogFile
        exit $errorCode
    fi

    logtext "Checking the WP_DIR has write permissions"
    if [[ ! -w $WP_DIR ]]; then
        errorLocation="Checking the WP_DIR has write permissions"
        errorCode=11
        errorMessage="Logs directory is not writable! Please ensure that the directory $WP_DIR has write permissions. EXITING!"
        logSendErrorMessages
        sendLogFile
        exit $errorCode
    fi

    cd $WP_DIR
    if [[ $? -gt 0 ]]; then
        errorLocation="Changing directory to $WP_DIR"
        errorCode=12
        errorMessage="Could not change directory to $WP_DIR! EXITING!"
        logSendErrorMessages
        sendLogFile
        exit $errorCode
    fi

    svn sw $WORDPRESS_SVN_DIRECTORY/$NEW_VERSION_OF_WORDPRESS >> $LOG_FILE
    if [[ $? -gt 0 ]]; then
        errorLocation="Running svn sw command in $WP_DIR"
        errorCode=13
        errorMessage="Problem running svn sw command in $WP_DIR! EXITING!"
        logSendErrorMessages
        sendLogFile
        exit $errorCode
    fi

    sendUpgradeLink

done

logsep
logtext "FINISHED RUNNING UPGRADES"

sendLogFile
</pre>
<h3>The jEdit screenshot</h3>
<p><img src="http://www.geniosity.co.za/genwp/wp-content/uploads/2008/11/shell-script-writing-in-jedit.png" alt="" title="Shell Script Writing in jEdit" width="500" height="400" class="alignnone size-full wp-image-268" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geniosity.co.za/musings/wordpress/shell-script-automate-wordpress-updates-for-multiple-blogs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
