Categories
Hilariously Funny or Creepy WordPress How To

WordPress: 503 Service Temporarily Unavailable when Posting New Posts or Modifying Existing Posts

It’s weird that I encountered this problem that when you post new posts in WordPress, there’s a possibility that it may run into a 503 Service Temporarily Unavailable error without publishing the article at all.

I did some split tests and in this post, the string ‘fopen’ which is a php function seems to be the culprit that prevents the post being posted, constantly causing the wordpress to make 503 service temporarily unavailable errors when you hit Publish or Update.

One workaround is to do the split tests on your posts and see which part of it is causing the problem so that you can change it to something else until WordPress accepts.

Haven’t notified the wordpress team yet, don’t know if they have received other complaints about this bug (or is it) or not, I think I’m just too lazy to send the report. Whatever… as long as you can get things done, doesn’t really matter if there’s a glitch.

Problem Solved

Update: Turns out this error is not alone in WordPress and not a bug of it at all. Some of the administration tasks of other CMS software such as posting posts with PHP code in them and uploading stuff would also trigger a module in Apache called Mod_security to be over sensitive. The solution is to disable the module (not recommended), or put a simple line into the .htaccess file of the site to tell Mod_security that:

  1. All requests from this particular IP address is absolved from being inspected and monitored by Mod_security module –
    SetEnvIfNoCase Remote_Addr ^123\.123\.123\.123$ MODSEC_ENABLE=Off
  2. All requests made to this specific PHP script is absolved of being checked for malicious attempts –
    SetEnvIfNoCase Request_URI ^/wp-admin/async-upload\.php$ MODSEC_ENABLE=Off

With WordPress, the potentially problematic scripts I know include:

  1. /wp-admin/async-upload.php
  2. /wp-admin/post.php
  3. /xmlrpc.php

So depending on the error you are getting from the task you are performing, insert one or two lines into the .htaccess to prevent any unnecessary 503 errors. Read more about this issue at DreamHost wiki.

By Yang Yang

Hello, I'm Yang. I build online businesses that please people. Want to join in and post some useful articles on Kavoir.com? Shoot me a message.

10 replies on “WordPress: 503 Service Temporarily Unavailable when Posting New Posts or Modifying Existing Posts”

Same thing for me – PHP’s curl_exec() triggers “Service Temporarily Unavailable”. Is it a bug or a security measure trying to squash exec()?

I might try modifying the file via FTP. But then I probably wont be able to edit it the normal way anymore.

hI, Yang!

Great post, buddy! Just little stuck somewhere.. As I am newbie, I don’t know much about networking and apache.

I am getting this error, while I try to access my dashboard. It says: “503 Service Unavailable”. But it’s let me log in, I mean I can see /wp-admin page. But While it tries to go Dashboard it gives the error.

I don’t know where to put the code, Would you please explain me where should I put it in .htaccess. I hope I made my point clear.

Thanks in advance.

[…] Some head scratching, googling and making a support request to Dreamhost followed. Apparently they had just had an outtake, so thought it was related. They did too. But it was not! I finally found the answer on a blog: Turns out this error is not alone in WordPress and not a bug of it at all. Some of the administration tasks of other CMS software such as posting posts with PHP code in them and uploading stuff would also trigger a module in Apache called Mod_security to be over sensitive. — https://www.kavoir.com […]

Comments are closed.