Posts Tagged “wordpress”

Thought I’d check out the wordpress app, seems pretty good.

Comments No Comments »

Wrote my first Wordpress plugin today (for www.bookthing.co.uk), it’s a pretty simple plugin architecture especially if you’re not trying to do anything too clever.  I just wanted a shortcode (some text you put into a post which is expanded by a plugin) to read some values from some custom fields and include them in the article footer.  It saves having to paste lots of formatting HTML into each post and lets you just suck content from the custom fields.

I was surprised I couldn’t find a simple ‘template’ style plugin on the Wordpress site, maybe I was just using the wrong search terms.  It’s the kind of thing that would be very useful for building common information boxes for reviews, etc.  Anyway, I hacked together a 59 line php file, of which around 1/3rd is info and license to read two custom fields and whack them into a div.

Took about 9000% less time than I expected.

Comments No Comments »

I’m a bit of a web-stat-aholic.  Despite the fact that this is a personal blog with hardly any relevance to the outside world, I still feel the need to see how many people read it.  But then that’s true of all the websites I throw up.  In some ways I find the stats just interesting, even if the numbers are really small, it amuses me how people find the sites, what search strings they use, and how certain pages get more hits.

I use three stats systems on this site, Google Analytics, the Wordpress.com stats plugin, and the CyStats plugin.  Clearly the whole area of ‘what constitutes a visitor’ is murky at best, and when a page is made up of lots of resources that each generate a request to the web server, it gets a little harder to work out how many hits you’ve had, but I’m amused by the difference in information the three systems provide, and the apparent totally useless Wordpress.com stats plugin.

When I moved the blog to Wordpress I thought the Wordpress.com stats plugin would be a good option, and indeed it looked like it was reasonably accurate when the visitor count was 1 or 2 people a day.  However, as the site gets found by google and random hits start to increase, the stats look more and more crazy, in particular the ‘top posts and pages’ section.

Here’s the current info from that plugin for pages visited today and yesterday,

stats1So yesterday, apparently the only two pages read on the site were the Watchmen post and the Wii Fit page.  And today, people are only reading the Watchmen post and nothing else.  I kinda find that hard to believe, and in fact, the other two stats systems agree that it’s complete bollocks.  I’ve no idea what-so-ever what the Wordpress.com stats plugin is doing but it’s certainly not recording which pages are being viewed.

Total visitors or page views being different I can live with because how they’re measured is pretty vague, but you would think a stats plugin would know which pages were being read, that is kind of the whole point.  In contrast, this is what CyStats thinks has been read today,

Windows 7 Beta - file sharing                           8   14%
Main page                                               8   14%
of protein and fat and blood sugar                      4   7%
So, what went wrong (or Wordpress, Cron and Squid)      3   5%
Lord of the Rings Online - a review - part one          3   5%
Windows 7 Beta in Sun's xVM VirtualBox                  3   5%
Where oh where has my Gallium gone?                     3   5%
/category/politics                                      2   3%
/tag/dvd                                                2   3%
A month with Wordpress                                  2   3%
Old photo's                                             2   3%
First real go at non-drybrush skin                      2   3%
Whiskey & Red Bull                                      2   3%
Windows 7 beta + Lord of the Rings Online               2   3%
David Gemmell Legend Award news                         2   3%
About                                                	2   3%
Eating without thinking                                 2   3%
/2006/08                                                2   3%
Archives                                                2   3%

which as you can see is rather more varied (and slightly more believable).  However, the list of visited pages on Google Analytics for today is different again, not just the numbers, but the actual pages, listing some not viewed above and missing out some that were viewed.

Ultimately, I have the logs from my web hosting account (when they work), and that means I can see, for real, which pages are being accessed and how often, but reading those logs can be a pain and using tools to interpret them just introduce more interpretation that leads to yet another set of figures.

I guess where I’m going with this post is that trusting the stats for your site is impossible, but some tools are clearly more broken than others, and the Wordpress.com stats plugin is entirely useless, since it’s clearly unable to work out which page your visitors are reading.  Don’t trust it.

Comments 1 Comment »

Most small websites on the ‘net sit on shared hosting of some kind or another 1.  Shared hosting means that a small number of servers handle all the requests for a large number of web sites.  How that’s achieved varies, but the bottom line is that it’s a shared infrastructure.  It’s a bit like living in shared accommodation.  There’s a single door through which everyone gets into the building, then a number of apartments which have their own doors.  But they all share the same electricity supply and water and other utilities.

With shared web hosting, all the traffic comes into the same web host network and web server cluster, and is then handled by all the different web site configurations.  In the same way that there are people who would like to break into your apartment, there are people who’d like to break into your web site to steal stuff, deface it, or to try and gain further access to the shared infrastructure.

Read the rest of this entry »

  1. this is an educated guess []

Comments No Comments »

I really like Wordpress, I’m glad I moved to it from Blogger.  I think with the right templates it’s pretty flexible, I wish I had a) more time and b) more css/layout skill to do some template work.  However, Wordpress search sucks.

It sucks for a few reasons,

  1. results come back in reverse date order (which makes sense for a blog but is too inflexible)
  2. there’s no indication in the search results which words matched the article
  3. the search just takes all the terms and does a basic sql query for any of them, so if you search for ‘i like bacon’ you get posts with the word like and then posts with the word bacon
  4. the standard navigation doesn’t tell you how many pages of results you got, just that you can read the next page

For blogs, I guess it’s ok as a basic tool, but really it should,

  1. return posts by most relevant first
  2. do proper searches based on the phrase you submit
  3. indicate which words matched the post
  4. show how many posts matched
  5. list the posts by just title, or summary or full and allow you to switch
  6. show which page you’re on, if there are more than one page of results

I’ve looked at various plugins, but not really had any luck finding one which fixes all the problems.  I’ll keep looking.

Comments 2 Comments »

Recently my web host (Gradwell) moved to a new hosting platform (Apache 2, php 5.2) to try and bring things up-to-date.  In general, the end result worked okay.  However, the load balancing they had in front of their web cluster was apparently sub-par.  This became entirely apparent when a single customer was able to bring the whole thing to a grinding halt with some kind of chess related website.

Now, I know it’s shared hosting, and you have to take the performance hits every now and then, but there’s a difference between ‘takes 2 or 3 seconds longer sometimes’ and ‘didn’t load’, ‘won’t load’, ‘took 8 minutes’.  I raised a ticket on the Friday when the problems got to their worst, but for reasons I’m not sure about, that didn’t get looked at by anyone technical until Monday.  So from Friday to Monday all my Gradwell sites were basically unusable between 1pm and 8pm UK time.

Gradwell made some changes on Monday and spoke to the owner of the other site, but it didn’t really fix the problem.  Eventually they decided to replace whatever load balancer they were using with a Squid reverse proxy, which had been running ‘fine’ in front of their php4 cluster.  They did this Tuesday night and since then the site has been a lot quicker.

However, it broke Wordpress.  Let me explain.

Read the rest of this entry »

Comments 2 Comments »

Sorry if your feed reader got about 20 test posts to my blog, but something’s broken.  The automated posting of scheduled posts isn’t working along with pings and a couple of other features.  It seems to be related to Gradwell putting squid in front of it’s shared hosting infrastructure, but I can’t work out where the issue is.  I was making lots of test posts to try and work out where the issue lay.

Sorry about that.

Comments No Comments »

Just upgraded the site to Wordpress 2.7 which was released today and wanted to make sure everything was working.  It’s going to take me a little while to get used to the new admin layout, but I’ve played with the beta’s and release candidates and I know for a fact that some things are a hell of a lot easier.

Then I read today that you can move the different boxes around on the admin pages and get to a very nice wide posting area and that made me very happy.

I’ve noticed that the category pages on the site no longer show custom headers after a Mandigo upgrade, hopefully that’ll get resolved soon, but until then, enjoy the default red mandigo logo on the category pages.

Comments No Comments »

I really can’t praise Wordpress enough.  It’s such a simple install (point it at your mysql server, and it’s done) and although out of the box it looks pretty ugly (in my view), there are so many quality free templates that it can look however you want in about 20 minutes.  Of course, it takes more time to use some plugins and decide on a layout in general, but really it’s so easy to use everyone who wants an web presence but doesn’t want to spend much time should use it.  It’s mainly a blog, but the pages feature means you can certain include a lot of ‘non-blog’ content easily as well.

Anyway, the point of this post, Grete has moved her blog from blogger to Wordpress over at her old URL (http://www.darkstorm.co.uk/grete) and she’s slowly moving the content over from her old personal website at that URL, so it’ll be more than a blog in the end (she assures us!)  She’s using the Mandigo theme as well, so I put together a few random headers for her site, she’s not seen them all yet so they may not all stay and at least one of them doesn’t work very well in my view, so I’ll probably get rid of it later.  But I liked them all anyway ;)

Comments No Comments »

If you do, you need to go patch. Doesn’t look hugely critical but my Wordpress install didn’t notify me of the update (like it usually does), and I only found it by accident, thought I’d mention it.

Comments No Comments »