Getting W3 Cache Working on shared hosting

I wanted to install w3 cache on shared hosting

After uploading the plugin to /wp-content/plugins/ and trying to activate it, I got an error asking me to set CHMOD 777 on /wp-content/w3tc

I tried running the command given, however it didn’t work.
I also tried manually creating the directory, setting 777 on it, and re-activating the plugin.
This, however, didn’t work, as the plugin deleted my newly created directory when it was “activating” and threw the same error.

I finally resolved this particular error by ensuring the site was not running in safe mode.
For this, I had to email the support guys with my particular hosting company (

Trying to activate it again, I now got this error:


/var/www/vhosts/<domain>/httpdocs/wp-config.php could not be written, please edit config and add:
define(‘WP_CACHE’, true); before require_once(ABSPATH . ‘wp-settings.php’);

So, I opened up wp-config, and made the change (around line 60)

define(‘WP_CACHE’, true);

Re-activated the plugin, and it worked!

reCaptcha enabled on comments

I’ve recently noticed a lot of blog comment spam on my blog.

Where  some-one kisses-bum in order to “trick” me into accepting  their comment.
For example:

Howdy there,this is Everett Krajcer,just discovered your web-site on google and i must say this blog is great.may I share some of the Post found in this website to my local friends?i’m not sure and what you think?anyway,Many thanks!

Complete with a nice back link to his crappy website about “low rate loans”

This black hat SEO tactic is become very widespread.

Simply google a few phrases from that comment

google results for "Howdy there,this is Everett Krajcer,just discovered your web-site"

Whilst you will not see any exact matches, they’re all along the same sort of lines, and on blogs…

The software posting these comments alters it very slightly for each blog posting, to fool search engines.  image

To combat this, I’ve installed the reCaptcha plugin onto WordPress

Installation took literally two minutes, and is now up and running. 

Apologies to any genuine comment posters, but the spam was becoming too much!

You can get the plugin here:

A few people have recently been asking how the NewPost method works within JoeBlogs

First, you need to create an instance of Post.

Then, set the following properties:

Fairly self explanatory, but you should set this to today’s date (or whatever date you wish the post to be set as published)

The title of the post

The body of the post.
This can of course contain HTML

This is a string array of categories to associate with the post

Another string array, representing the tags for the post

Then, using your presumably already instantiated Wrapper class, you can call the NewPost method, which takes the above Post object as a parameter, and a boolean – indicating if the post is to be set as published. Note – if this is set to false, the post is set in draft mode.

Here’s some sample code:

Hope this helps!

Specify XML-RPC Endpoints at Run Time With CookComputing

A common question when using Cook Computing XML to talk to blogs etc… is how to specify a blog / endpoint at runtime? Most of the examples seem to specify the details in an attribute… not much use if you’re trying to develop a wrapper.

To enable me to create JoeBlogs, I made use of the IXmlRpcProxy Proxy classes…

I created my interface, implementing IXmlRpcProxy:

We define the method as an XML RPC method using XmlRpcMethod.
The name of the method is also specified.
In this case, we are using getPost from the metaWeblog XML RPC API – WordPress supports this, as well as the Blogger API and the Movable Type API.
They also have their own (which is an extension to the Moveable Type API) –


As per the metaWeblog.getPost specification, we need to pass in the postid, username, and password. So we create our interface as follows:

As we can see, this returns a “Post”

This is a struct, that basically defines the structure of the response.

To use this,  you need to create an instance of the proxy object.

XML provides a method called XmlRpcProxyGen to do this for us.

We then set the Url, which is declared as part of IXmlRpcProxy (remember IMyProxy implemented this interface…)

Since our proxy declared the method GetPost, we can now use this, pass in the required post id, username and password.

And there we have it.

Of course this is a very bare bones example.

JoeBlogs contains much more separation of these concerns.

C# WordPress Wrapper

Ok, I’ve barely finished this as a stable release, but I thought I’d post this up any way….

A little open source project I’m working on – Joe Blogs.

In a nutshell, it allows easy communication to your WordPress (or other blog) via an xml-rpc interface.

Big thanks to the work by Charles Cook at

Joe Blogs is currently hosted on CodePlex –

I’ll be posting more info, tutorials, documentation etc… in the coming days and weeks.


See here for usage instructions: