Monthly Archives: January 2010

How to modify the Modularity Lite 1.2 from Graph Paper Press

If you don’t know this theme yet, you should check it out at Graph Paper Press.

Modularity Lite is Thad Allender’s freebie version of a larger framework. I was customising this theme for Jerry Hyde’s site recently, and thought I’d take some notes to share with you.

Continue reading How to modify the Modularity Lite 1.2 from Graph Paper Press

How to get advertising banners for your site

My experiences with both Amazon Widgets and Google Ads is simple: they don’t work – all they do is ruin my sites. I’ve not made a penny with them, keeping in mind I run about 20 sites which amounts to plenty of traffic. I believe we as surfers know what an “unhelpful” ad looks like and we automatically blank it out – much like billboard ads, TV ads or newspaper ads. Sites like Facebook and eBay don’t use them either, indicating they’re a waste of time.

Advertising should supports your site, not destroy it. Say you’re writing about technical aspects of web design, then ads for web hosting and domain registration are helpful – and supportive. But ads about rather unrelated material are not, especially if they’re generated by contextual algorithms. Which products and services work best is a matter of trial and error I’m afraid, and there’s no set formula.

Here’s another example:

Imagine you’re writing about music and bands, then maybe iTunes is a good ad to have. Say you’re writing a post specifically about Alexandra Burke’s new tour, why not have “Buy her album on iTunes” at the bottom – if someone makes a purchase via that link, you’ll get a cut. This link has to go diretcly to one song or one specific album, not to “iTunes in general” though.

Getting your hands on specific ads and banners is fairly easy by joining some of the big advertising affiliate partners. Amazon and many others have their own affiflate scheme, but larger brands often outsource this business to companies like

Let’s look at some vocabulary:

You as an “advertising displayer” are called an “affiliate”. The other side of the business is called a “merchant”, which is you have a product or site and ads that you want other affiliates to display. For now, you’re an “affilate”.

You’ll get paid into your bank account once you reach a certain threshold of cash (say £50 or £100). You’ll make money either by people clicking on those links (that’s called “pay-per-click”), or if people actually buy something on the advertiser’s site (that’s called “pay-per-lead”). The money comes from “merchants”, who in turn pay people like you and me for having adverts displayed.

The list of programmes above – like many others out there – provide text links and banners in all different sizes to suit your posts and sidebars. A banner is usually part of a “campaign”, which can change from time to time. Ads in a campaign will dynamicaly update to the next campaign so you won’t have to get involved – unless you’d like to of course.

The way to display ads is either as a text link like this or banner (usually used in a plan text widget in your sidebar, or hard coded say into your header). Some theme developers leave comments in their code to indicate where to put an ad, and which dimensions will work well. An example for such a theme is Aerodrome by Joe Fishler.

Navigating the affiliate programmes can be a tad cumbersome though. They’re fairly complex and provide a LOT of data. Your first step is to join one of those sites above, say Link Share. They approve or decline you as an affiliate.

But someone like Link Share has thousands of merchants on file. To display a specific advertiser’s links (say iTunes for example), you’ll have to “join” that particular merchant. That merchant will then have a look at your site and either approve or decline your application. There are plenty of spam sites out there, and of course big brands don’t want to be associated with those. Once a merchant has approved your site, you’re ready to display their ads. It can take a day or two until you hear from them, but sometimes the decision is made in minutes.

In a nutshell:

Someone like Link Share is only the “delivery platform” for adverts and deals with tracking those ads and giving you payouts. But the actual adverts and campaings come from merchants (like iTunes or Sky) who have also joined.

There are MANY other affiliate schemes you can join, and it’s about finding the one(s) that are right for you, or have the products/brands you’d like to promote. If you like a particular site, have a look at the bottom and look for something like “webmasters” or “make money promoting us”.

The key is to use these affiliate links casually – you can use them in a post, or even tweet them when it’s relevant. Don’t overload your visitors though. Nothing is worse than a site cluttered with more adverts than content!

One last thought to consider:

if you’re running an e-commerce site (i.e. you have products for sale, and the website is primarily there to sell them), why drive customers away to other services? Amazon and eBay do this sometimes, and there’s really no need for it. An e-commerce site makes money by selling products, not by advertising.

Good luck 😉

How to repair MySQL tables from the Command Line

Sometimes your tables crash and your website is unresponsive. You don’t have access to phpMyAdmin to do a repair, because you can’t access Plesk. That sucks!

When you’re out in the field and all that’s at hand is a trusty SSH connection from your mobile, here’s an alternative way to bring your WordPress Sites back to life.

You need the following ingredients:

  • Database Name (I’m using “databasename” here)
  • User Name (I’m using “username” here)
  • Password for the above

All three will be in your wp-admin.php file, use Vi to check if you’ve forgotten them.

Next it’s time to get busy with some MySQL commands I keep forgetting (hence this article):

This will ask you for your password, which you can type but won’t see written out onscreen. Upon success, you’ll be deep in MySQL territory, not the Linux prompt anymore. Next, we’ll select our actual database in use for the site:

Note the importance of the semicolon at the end of the line. Now let’s see which tables are in that database and what they’re called:

show tables;

Excellent! We’re getting there! You’ll see everything that’s in your database, almost like in phpMyAdmin (just less convenient). By default, you should be seeing entries like “wp_options”, “wp_links”, wp_posts” and so forth. The “wp_” is the default prefix for WordPress tables, but depending on your installation this may have changed to something else.

Depending on what else you’re using your database for, there may well be other entries from projects such as PHPList, Drupal, phpBB and so forth. The principles are applicable for every application that’s using MySQL.

You’ve got a whole host of commands at your fingertips now, but the most important ones for a rescue mission like this are probably

The “check table” command seems to repair minor errors, like hosts not having closed connections. It also shows you what’s wrong with a table, or if it’s OK. The “repair” command checks, optimizes and repairs a table – so it’s probably the best one to use.

Unlike phpMyAdmin, you have to issue one command per table; you can’t select all tables and say “repair all” (and if you can, I don’t know about it – in which case, please leave a comment and enlighten us).

For WordPress, that’s 11 tables you need to check – so it’s not a major inconvenience.

Once you’re ready to leave the heady heights of MySQL, type “quit” and you’re back to the command prompt.

Good Luck!

How to batch-upgrade plugins in WordPress 2.9+

One of the big features announced with WordPress 2.9 was the ability to upgrade several plugins at once. Trouble is, it’s not an easy to find feature. Fret not, for The Guru has found it!

You’d expect to go to Plugins, check the ones you want to upgrade and choose “Upgrade All” from the bulk actions drop down. Er… no.

Instead you need to go to TOOLS – UPGRADE and see a list of upgradable plugins there. You can tick the ones you want to upgrade, or check all, then hit the button as usual and hack in your FTP details. Note that this list won’t be there if all your plugins are up-tp-date.

The upgrade process will then be started in what’s known as “maintenance mode”. It can take some time with little to no feedback, so please be patient while you watch an empty browser window. Make sure you leave your browser alone until you see a “success” message.

According to this trac ticket, this functionality may well see an overhaul in future releases.

Until then, enjoy 😉