Rebuilding my Operating System

Every once in a while, I think it is a good idea to rebuild the operating system on a PC.

This machine has a partitioned hard disk, with the Primary partition holding Windows and all the programmes.  The Secondary partition holds all the data and all the other junk that accumulates over time.  Rebuilding is therefore quite a simple operation, provided it is planned in advance.

The first thing I do is to back up everything on the secondary drive (just in case).  Then I copy the User directory, both to the secondary drive and to backup.  This is the key to a smooth restore of everything.

A couple of nights ago, I rebuilt this machine.  I formatted the Primary partition and installed the operating system.  I then installed fresh copies of all my essential software.

The problem now would be that I have lost all my settings.  For example, my FTP software would have lost all its saved passwords and connection settings; my mail would all be lost and all my browser bookmarks would be gone.  This is where the saved User directory comes in.

For example, I use Firefox and Thunderbird for browsing and mail.  All I had to do was copy the profile contents from my saved directories into the new ones.  Bingo!  All my mail is back.  All my plugins are restored along with my bookmarks and saved passwords.  The same technique applies to my other software including FTP.

It took about six hours to restore the machine.  For most of that time the machine can be left to do its own thing as it installs or copies files. 

It is now running like the clappers.  It reboots in a quarter of the time.  I am no longer getting errors.  Programmes that had ceased to work are now in full working order.  I was getting the occasional Blue Screen of Death.  I haven’t seen one since.

For the time involved, it is worth every minute.

Money for nothing

About three years ago, I joined up with Google AdSense.

I installed the software on two sites and sat back to wait for the money to roll in.

I don’t like advertisements at the best of times, and ads on websites can be particularly annoying, but I hoped it would provide a little extra revenue, so I put my principles to one site. 

Sure enough, the ads looked horrible.

After a couple of years, I hadn’t made much more than about a hundred and fifty dollars, so I decided that I would remove the function from one of the sites [Head Rambles], and let the other site tick over.

Of course, the mere trickle of income dried up even more, and I decided recently that the whole thing just wasn’t worth the bother.  I decided to scrap Google AdSense completely so that my conscience could be clear once more.

I went into the other site to disable the plugin.  There wasn’t one.  I realised I must have hard coded the script in, so I went to the source code.  There was no script.  I realised that I had rewritten the site some time ago, and must have forgotten to insert the Google AdSense script into the new code.

So now I have no sites using Google AdSense.  But for some strange reason, there is still a trickle of income.  It’s not much – I made $0.84 last month!  According to Google, the income is from both the original sites, but neither have the code, or are displaying ads.

I don’t know where the cash is coming from, but I won’t bother closing my account.

If nothing else, it amuses me.

Stumbleupon

I confess I know little about Stumbleupon.

I know the general principle – you like something, you Stumble it – but it still baffles me.

A couple of years ago, an article in Head Rambles was Stumbled.   The effect was virtually instantaneous and a little alarming.  My hosting company phoned me to say they were on alert because of traffic to the server, it was that bad (or good, depending on your point of view).

Since then, that article has ridden through several Stumble Storms, as I call them.  None has been as powerful as the original, but they still cause massive traffic.

Stumble Graph 1 The graph above clearly shows the initial storm on October ‘08.  The majority of the little stalagmite peaks after that are mini-storms.  They appear to occur at random intervals and random intensity.

There is a storm in progress as I write this.

Stumble2

The graph above shows hourly traffic over a seven day period.  The storm started at around eleven last night and is easing off now, but the effect is very clear.  As storms go, it was a very minor one, but I’m not complaining.

What does baffle me is where these storms originate.  I have searched Stumbleupon and can find no mention of Head Rambles.  Presumably though there is a page somewhere that people are seeing?  Has it risen up the ranks again for a brief moment of glory? 

I have a lot to learn about this Internet lark!

Copying a WP site into WPMU

I look after nine blogs.

Six of them are on my own servers and three have their own hosting.  After my last post, I thought I would try an experiment – to combine several of those blogs under one roof, so simplify maintenance and to streamline things.  Checking nine blogs on a regular basis for updates and upgrades can be tedious.

I set up WordPress MU on a test site.  For the sake of the test, I used a few spare domains I had lying around.

Installation of WPMU is simplicity itself, requiring only the basic knowledge of how to install a database [I used Cpanel] and the ability to change permissions on the server [again using Cpanel].

Having set up the root blog, I set up a subsidiary blog, and decided to try to mirror this site on it.  Once again, setting up the blog could not have been easier, but then my troubles started – how to I import all the features of this site onto the new one?  I want the two sites to be precise mirrors, so this involves copying the theme, the posts, comments, images, tags, categories and links.

Copying the theme is simple.  I just took a copy of the live theme folder, put it in the WPMU installation and activated it.

Copying the posts was relatively simple too.  All I did was to export the XML file from this site and then import into the other.  This gave me the ability to copy all the images as well which was just what I wanted.

I was now left with a problem.  The XML export/import facility does not include links or link categories.  This required a bit of lateral thinking.

In the end, I decided to use the sledgehammer approach. Using PHPMyAdmin, I exported this site’s entire database excluding “wm_2_options”, “wm_2_users” and “wm_2_usermeta”.  I then opened the downloaded file and made a simple change.

To explain the change I made, it is necessary to understand the construction of the WPMU database.  The root blog will contain its records in, for example “wm_2_posts”.  Anything starting with wm_2_ pertains to the root, or the global site.  The individual sub blogs contain a numerical prefix, so you will end up with “wm_2_2_posts”, “wm_2_3_posts” and so on.

I ascertained which prefix my sub blog was using and then did a simple find and replace on the entire database dump, replacing “wm_2_” with “wm_2_2_” or whatever the prefix is.  I then imported this file into the new WPMU database.

It may seem that I have duplicated things here, as I had already imported the posts and comments, but I did that essentially to just import the images.  I overwrote the information to maintain the integrity of all the ‘meta’ tables.

The result is rather effective – you can see it here, though please don’t leave any comments on it, as they will be dumped!

My next problem [and it’s a big one], is how to map my domain to pont as an alias to the new site.  So far, I can only point a domain to it, whereas I want the domain to act as an alias and to mimic precisely the URLs of all the old pages.

Any ideas?

WordPress 3

For some time now, I have been playing around with WordPress 3, and I must confess I am disappointed.

I have nothing against WordPress itself, but I expected something pretty radical with the advent of a major release, and for the general user there is very little there.

Of course, one of the main features is the integration of WP with WPMU, but I wonder just how many use WPMU in the first place?

For the ordinary user, one of the major changes has been the departure from some of the default settings on installation.  From the security standpoint, this is a good thing.  No longer is Admin the default user, and the prefix to the database tables is now customisable, but the problem here is that it affects new installations only.  An upgrade from V2 to V3 is going to leave the old defaults intact, and to avail of the new settings one would have to scrap the old site and do a fresh install.  Even then, importing the old database into the new is going to be difficult, as all the table names will have changed.

Apart from the above, there are very few things that stand out.  A new default theme?  The ability to bulk update plugins?  As I said, I expected more from a primary upgrade.

I still love WordPress as a package, but this isn’t something I would queue all night for.

Analysing Alexa

Dedicated followers of this site (i.e. Me) will have noticed that I have a passing interest in Alexa and its ranking methods.

My main reason for this interest is because Alexa seems to be the benchmark of choice in advertising.  I suppose they have to chose some method of ranking sites, but the choice of Alexa is a little baffling.

I have been charting the progress of several sites over the weeks, to see if I can spot a relationship between traffic an ranking.  So far, the relationship has eluded me.  For example, one of the sites has daily visitor numbers in the single figures, while another has daily visits of around 150, yet the two sites are running neck and neck in the rankings, and in fact the latter site is trailing the former, which is completely illogical.

Some weeks ago, I set up a test site.  It is self hosted, with its own domain, but as yet its existence has not been advertised.  As far as I am aware, there are only two people on the planet who know of its existence.  About three weeks ago, I decided to add it to my Alexa monitoring list.

When I started monitoring it, it had a ranking of 1,341,686, which struck me as being quite high for a site that essentially doesn’t exist.  Over the weeks, it has been climbing the ranks at an alarming rate, and now stands at 620,853.  I have seen quite popular sites that are still ranked in the millions.  What the hell is going on here?

One possible theory is that I am skewing the figures, simply by visiting the site to read the stats.  If that is the case, then I would contend that it’s like judging newspaper circulation by counting the number of times that paper is bought in one particular shop.  If one person is a representative sample of internet usage, then what value are the statistics?

My advice?  Unless you are an advertiser, forget Alexa.

wwtraffic
The Philippines accounts for about 0.4% of traffic!!

A bit of an overhaul

I think the look of a site is important.

First and foremost, it should be pleasing to the eye.  It should also reflect the general content of the site, so that a simple glance at the screen should give an idea of the type of site it is.

Customising a theme can be simple or difficult, depending on how far you want to go.  My philosophy is to take a theme that is as close as possible to my final desire, and then to make the minimum of changes.  Head Rambles, for example has been through a couple of modifications.  It is now heavily customised to the point where the original theme is almost unrecognisable.

As I said before, I wasn’t too happy with the theme here.  I felt it was time for a radical overhaul of the entire site, both in look and name.

Why chose “A Pipe and a Keyboard”?  Mainly because it sums up my necessities for writing.  It is a personal site, with quite a bit of technical stuff, so the pipe represents the personal, and the keyboard represents the technical. 

I chose the design for its simplicity.  I like the simple layout, which doesn’t detract from the content, and apart from a few minor tweaks to the font, the only big change I have made (so far) is to substitute the banner image.  There are a few changes to be made yet, of a minor nature, such as additional navigation and tweaks like that.  I’m not too sure about the image, as yet.  I know the pipe looks a little unusual, but it is the pipe I generally smoke, so it deserves its place on the Internet. 

Bulk editing blogroll entries

I don’t profess to be a complete expert on WordPress and its finer workings.

Whenever I want to do something like a bulk modification or something like that, I tend to search around for some kind of plugin or some other solution on the Internet.  I am rarely disappointed.

I have been doing some modifications over on Head Rambles where I have shifted the links (Blogroll) onto a separate page.  I wanted to go a little further with this and to do this, I needed to place the links into the database rather than have them hard coded on a page.

I am a great fan pf PHPMyAdmin, so writing up an SQL textfile to insert a batch of links into the Links Table was relatively simple.  The Links Table had some legacy stuff in there so the result was a refreshed table with 147 entries.  So far so good.

I wanted to set all my Links to a particular category, and this is where I ran into a problem.  The last thing I wanted to do was to have to manually edit 147 entries and it would have been extremely slow and tedious.  I searched high an low and found quite a few others trying to do the same thing, but no solutions.  I had discovered the numerical identity of the category (it was 2) and tried a bulk change of the field ‘link_category’ to 2.  This didn’t work, for some reason.

On delving a little further, I found that in fact the relationship between links and categories is held in the table Term_Relationships.  As an experiment, I went back to my text editor and built up a series of inserts for this table –

INSERT INTO `term_relationships` (`object_id`, `term_taxonomy_id`, `term_order`) VALUES
(X, 2, 0),
(X, 2, 0),
(X, 2, 0);

where X is the ID of the link. 

On running this file, I got several errors indicating duplicate fields.  These represented the legacy entries, which was fair enough.  I just deleted the relevant entries from the text file.

Ultimately, my batch fix worked, and all the links are now entered under their correct categories.

I strikes me though that this would be a fine opportunity for someone to develop a plugin that does batch jobs on Links?

A change of outlook

I always felt I had a small problem with the theme for this site.

old_theme

It was a lovely theme, but I always had a feeling that because it was so good, it somehow got in the way of the content.  Was the site here because I liked the look of it, or because I had something to say?

I have decided to switch to a new theme.  I’m not saying that this theme is any worse than the last one, but I feel it concentrates more on the content, rather than just shouting “look at me, amn’t I beautiful”.

I have a few tweaks to do to it yet.  I have already darkened the text, and I want to increase the font size a little.  I had an interesting time setting Windows Live Writer to reflect the new theme as it is a complex one.  It is essentially two themes – the base theme is Desk Mess Mirrored, but there is a child theme installed on top of that – Desk Mess Multi, which provides one or two extra knobs.  I had to revert to the base theme before I could get WLW to reflect the theme, and then set the site back to the child again.

So far, I like it, but then it has only been up for a couple of hours.  Time will tell.

Any thoughts?

WordPress Plug-ins – Comments

The most important aspect of any website is to facilitate the reader.  Blogging has the additional factor of providing a two way conversation, so an easy to use site is essential.

I visit many blogs in the course of a day, and some of them make the very business of interaction so complicated that I tend not to revisit.

The most important aspect is to allow commenting to be as easy as possible.  Blogger [the free service] is a nightmare in this respect as it involves popups and Captchas which I hate.  In general, most blogs are easy to comment on, but they lack a couple of features which I think are rather irritating.

When I leave a comment on a site, I consider it to be part of a potential conversation, and I therefore have to revisit the site on a frequent basis just to see if there is a reply.  A very simple plug-in which helps here is ‘Subscribe to Comments‘.  This enables email notification, if the subscriber wants it.  It is one of those plug-ins that really ought to be part of the core code.

Another thing which I find irritating is to write a comment, submit it, and then find a glaring typo or omission when it is too late to do anything about it.  A very simple solution to this one is to install ‘WP Ajax Edit Comments’.  Unfortunately, I see they are about to start charging for updates to this, so I will either stick with my current version, or find an alternative.  In the meantime, this allows the commenter a pre-set period of time to revisit and edit their comments.

One plug-in I like, though it is not essential is ‘MCEComments’.  This embeds the TinyMCE code and adds the ability to format text in the comments, such as Bold or Italics.  The plug-in can be fairly easily tweaked to provide a huge range of facilities such as justification, image embedding and link embedding.  Most of these are best left off, but it is nice to have the facility if required.