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 (ehosting.com)
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)
Re-activated the plugin, and it worked!
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.
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
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.
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:
//create a new post
var post = new Post();
//since this is a struct, we can't have a constructor that does this!
post.title="This is a title";
post.description="this is the body of the post. it <strong>could</strong> be html.";
//create the post!
Hope this helps!
A common question when using Cook Computing XML RPC.net 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:
public interface IMyProxy: IXmlRpcProxy
Post GetPost(string postid, string username, string password);
As we can see, this returns a “Post”
This is a struct, that basically defines the structure of the response.
public struct Post
public DateTime dateCreated;
public string description;
public string title;
public string postid;
public string categories;
public override string ToString()
To use this, you need to create an instance of the proxy object.
XML RPC.net 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.
public void myTest()
string postId = "1234";
string username = "myUsername";
string password = "password";
var proxy = (IMyProxy)XmlRpcProxyGen.Create(typeof(IMyProxy));
proxy.Url = "www.alexjamesbrown.com";
var post = proxy.GetPost(postId, username, password);
And there we have it.
Of course this is a very bare bones example.
JoeBlogs contains much more separation of these concerns.
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 http://www.xml-rpc.net/
I’ll be posting more info, tutorials, documentation etc… in the coming days and weeks.
See here for usage instructions: