Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

faultCode: 405 faultString: XML-RPC services are disabled on this site. #7

Open
tjfarrar opened this issue May 22, 2020 · 0 comments
Open

Comments

@tjfarrar
Copy link

I am trying to upload an .Rmd file as a Wordpress blog post using the following code:

options(WordpressLogin = c(`[email protected]` = 'password'),
        WordpressURL = 'https://www.sitedomain.com/xmlrpc.php')
knitr::knit2wp('blogpost005.Rmd', title = 'Foo', publish = FALSE)

This fails with the above-mentioned 405 error. However, the site administrator assures me that XML-RPC services are enabled on the site. Under WP htAccess Editor I found the following, which I believe is the standard configuration for enabling XML-RPC:

<Files "xmlrpc.php">
Order Allow,Deny
allow from all
</Files>

I also verified that the xmlrpc.php page on the site domain does load in the browser and gives the message, 'XML-RPC server accepts POST requests only.' I am not sure whether that is typical, or whether the knit2wp function does actually make a POST request (if not, that could be the source of the problem).

Comparing my R code to the demo in the knitr documentation, there are only two differences. One is that in my case the WordpressURL is a private domain rather than a sub-domain of wordpress.com; I don't think that should matter. The second difference is that my username on the site is my email address. Therefore I could not exactly specify WordpressLogin in the form WordpressLogin = c(user = 'password'), because R would not accept user being replaced by an email address due to the '@' symbol being disallowed in variable names. I thought I could get around this by placing my email address within backticks. The options command then executes, but I'm not sure whether that or something else is causing the 405 error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant