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 “wp_options”, “wp_users” and “wp_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 “wp_posts”.  Anything starting with wp_ pertains to the root, or the global site.  The individual sub blogs contain a numerical prefix, so you will end up with “wp_2_posts”, “wp_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 “wp_” with “wp_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?