XML-RPC server accepts POST requests only Error Message

You are here:
Estimated reading time: 1 min

In some rare cases when visiting your site, it returns a blank page with the message XML-RPC server accepts POST requests only.

First, make sure you installed latest available version of Swift Performance. If you need to update, rebuild cache after update and if the problem still persist, it could be due to incorrect or missing (forced) 301 redirect rules in .htaccess.

To solve the issue, you should add redirect rules (HTTP to HTTPS and non-www to www or vice versa) in Settings->General->Tweaks: Custom .htaccess.

These are the rules that you might use to add into the .htaccess file (don´t forget to replace yourdomain

# Redirect www to non-www
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.yourdomain\.com [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301]

or

# Redirect non-www to www
RewriteEngine On RewriteCond %{HTTP_HOST} ^yourdomain\.com [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301]

and

# Redirect HTTP to HTTPS
RewriteCond %{HTTPS} !on
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

Important! Manual code edit required before use!
You will have to manually edit 2 lines of code: 
Replace yourdomain\.com with your domain. Keep the backslash \!
Replace http://www.yourdoamin.com with your WordPress site URL. Apply the protocol that is correct for your site: http:// or https://

Was this article helpful?
Dislike 0 0 of 0 found this article helpful.
Views: 42