Title: WordPress Admin   PHP FastCGI   502 Bad Gateway Errors
Last modified: August 22, 2016

---

# WordPress Admin PHP FastCGI 502 Bad Gateway Errors

 *  Resolved [theevent](https://wordpress.org/support/users/theevent/)
 * (@theevent)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors/)
 * Hello,
 * I recently switched hosting to Media Temple Grid. Shortly after migrating my 
   website I turn on PHP 5.3.29 FastCGI because I was doing everything I could to
   speed up my site. I began experiencing 502 Bad Gateways while trying to publish
   new articles (previewing, and even scheduling articles seems to work ok, but 
   I cannot outright push the publish button or it throws a 502). Images often fail
   to upload, and even clicking around to different sections of the Admin will produce
   a 502. The 502s only happen when using the backend.
 * Because I turned on FastCGI shortly after migrating to the Grid, I did not correlate
   this problem with the PHP change at first. I thought it was a problem with the
   migration. I’ve been doing much Googling over the past few weeks trying to fix
   this and finally found other people who are experiencing the same problem, here:
 * [https://wordpress.org/support/topic/admin-attempting-redirect-to-https?replies=6](https://wordpress.org/support/topic/admin-attempting-redirect-to-https?replies=6)
 * The problem described and the server errors are _identical_ to my problem. I 
   thought I’d start a new thread, as the one I linked to is quite old.
 * I turned off FastCGI a week ago (I switched to 5.3.29 CGI (Stable) — or should
   I switch it to 5.5.18 CGI (latest)?). I am still experiencing the problem and
   my site is pretty much unusable at this point because I cannot post new articles.
 * I really have no idea how to correct this problem at this point and I’m hoping
   some of you kind people can help to point me in the right direction.
 * I’m so frustrated at this point, I am not opposed to deleting everything and 
   starting over with a fresh WordPress install and a new database. I have a current
   backup, but would this route even fix the problem since the problem appears to
   be with PHP?
 * I found the following information, but I’m not at all sure how to proceed.
 * [https://kb.mediatemple.net/questions/35/PHP+Safe+Mode,+Problems,+and+Workarounds#gs](https://kb.mediatemple.net/questions/35/PHP+Safe+Mode,+Problems,+and+Workarounds#gs)
 * [https://kb.mediatemple.net/questions/137/How+can+I+edit+the+php.ini+file%3F#gs](https://kb.mediatemple.net/questions/137/How+can+I+edit+the+php.ini+file%3F#gs)
 * [http://www.askapache.com/php/php-htaccess-tips-tricks.html](http://www.askapache.com/php/php-htaccess-tips-tricks.html)
 * I would REALLY appreciate any input anyone has to offer.
 * Thanks so much,
    Laurie

Viewing 15 replies - 1 through 15 (of 28 total)

1 [2](https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors/page/2/?output_format=md&replies=8)
[→](https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors/page/2/?output_format=md&replies=8)

 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors/#post-5556980)
 * Have you contacted your hosting provider about this yet? 502 is a server-level
   error, not a WordPress error, and WordPress has no known compatibility issues
   with PHP 5.3.29 or FastCGI.
 *  Thread Starter [theevent](https://wordpress.org/support/users/theevent/)
 * (@theevent)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors/#post-5556984)
 * I have called them and they told me the server was working properly, so the error
   must be on my end. I had them look at my logs and because the server error has
   to do with ‘wpbrute.config’ they had the gall to tell me it was because I was
   entering my password in wrong! I disagreed, and let’s just say the conversation
   did not end well.
 * This was before I found out the error was related to FastCGI. I’ll try giving
   them a call again tomorrow. I have been less than impressed with Media Temple’s
   tech support. Maybe now that I’ve pinpointed the error they will be willing to
   help.
 * I appreciate you taking the time reply.
 * Thank you.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors/#post-5556985)
 * What is “wpbrute.config” from? That’s not part of standard WordPress, and I suppose
   it’s possible that is the root of the problem.
 *  Thread Starter [theevent](https://wordpress.org/support/users/theevent/)
 * (@theevent)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors/#post-5556988)
 * Every time a 502 happens, I check my server log for clues and its always the 
   same error
 * `[Mon Dec 08 13:08:13 2014] [error] [client 216.70.122.75] ModSecurity: Warning.
   Match of "rx ^POST$" against "REQUEST_METHOD" required. [file "/etc/apache2/mod_security/
   custom/wpbrute.conf"] [line "9"] [hostname "www.theeventchronicle.com"] [uri "/
   wp-login.php"] [unique_id "VIYTPUgv9A8AAHCOE3UAAAEm"]`
 * It’s the identical error that other people were having in this thread:
 * [https://wordpress.org/support/topic/admin-attempting-redirect-to-https?replies=6](https://wordpress.org/support/topic/admin-attempting-redirect-to-https?replies=6)
 * The original poster of that thread fixed their problem by turning off FastCGI.
   I did that as well, but am still having the same problem.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors/#post-5556991)
 * Ha, yeah that’s definitely your hosting provider’s server configuration.
 * I’d send them the log expert again, and if they again claim it’s not them, ask
   to speak to someone else.
 *  Thread Starter [theevent](https://wordpress.org/support/users/theevent/)
 * (@theevent)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors/#post-5556994)
 * Thank you so much, James! You have confirmed my suspicion. I always do pretty
   thorough troubleshooting before I call tech support to ensure it is not an issue
   on my end, but this one had me stumped. There were a couple of things said by
   the tech that made me think he was not the person I should have been speaking
   to, so I will use your advice when I call tomorrow.
 * This has been stressing me out for weeks. I really appreciate that you took the
   time to reply and point me in the right direction.
 * Thank you!! 🙂
 * Laurie
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors/#post-5557002)
 * You’re welcome!
 *  [fyaconiello](https://wordpress.org/support/users/fyaconiello/)
 * (@fyaconiello)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors/#post-5557079)
 * i’m also having this issue on MT:
 * [Thu Dec 11 06:25:12 2014] [error] [client 173.167.83.17] ModSecurity: Warning.
   Match of “rx ^POST$” against “REQUEST_METHOD” required. [file “/etc/apache2/mod_security/
   custom/wpbrute.conf”] [line 0;”9″] [hostname “www.xxxxxxxxxxx.com”] [uri “/wp-
   login .php”] [unique_id “VImpSEgv9A8AAAlbwQYAAAEE”]
 * on support now trying to get resolution
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors/#post-5557082)
 * As it’s a different hosting provider, if MT can’t solve it for you, please open
   your own thread: [https://wordpress.org/support/forum/how-to-and-troubleshooting#postform](https://wordpress.org/support/forum/how-to-and-troubleshooting#postform)
 *  [fyaconiello](https://wordpress.org/support/users/fyaconiello/)
 * (@fyaconiello)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors/#post-5557084)
 * [@james](https://wordpress.org/support/users/james/) MT = Media Temple, and this
   is the same issue everyone above is having with the wpbrute.conf sorry if I wasn’t
   clear with my description of the issue.
 * As an update, I just spent an hour on the phone with several different support
   techs at Media Temple. They had me change the file permissions several times 
   after concluding that it was a permissions issue. However, their diagnosis of
   the problem and supposed solution has gotten me no closer to a fix. We just turned
   on error reporting and logging, so they want me to call back in a few hours after
   the logs have filled a bit.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors/#post-5557089)
 * Ah, sorry, for someone reason I thought the OP had a different hosting provider.
   I’m aware that MT often = Media Temple.
 * Best of luck getting that fixed with them. It’s undoubtedly their own custom 
   mod_security configuration.
 *  Thread Starter [theevent](https://wordpress.org/support/users/theevent/)
 * (@theevent)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors/#post-5557092)
 * Two more calls today and still not resolved…
 * @fyaconieelo The tech I was working with today has a link to this thread, and
   I made sure to let them know that you’re having the same issue. Has anything 
   been resolved on your end?
 * Last time I called they offered to turn off their custom wpbrute.config. But 
   for some reason, today they cannot.
 * I have a news website and if I can’t post the news, people look elsewhere. I 
   usually get around 30,000 page views a day… so far today 3500!!
 * fyaconieelo, please keep me updated on your situation and I will do the same.
 * Thanks!
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors/#post-5557093)
 * Hm, I do hope they can fix it. As the error clearly states, the problem is with
   their mod_security configuration.
 * Not to stir the pot too much, but if your site is critical, and they aren’t able
   help with their own mod_security configuration (going on 3 days now), [https://codex.wordpress.org/Moving_WordPress](https://codex.wordpress.org/Moving_WordPress)
   and [https://wordpress.org/hosting/](https://wordpress.org/hosting/) may come
   in handy.
 *  [fyaconiello](https://wordpress.org/support/users/fyaconiello/)
 * (@fyaconiello)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors/#post-5557096)
 * my response to them:
 * > This issue was addressed on the phone call, but never resolved. I have an ongoing
   > issue with whatever you guys have set up in your mod_security configuration.
   > Media Temple needs to stop using the config that is causing this issue: “/etc/
   > apache2/mod_security/custom/wpbrute.conf”
   > Myself and other WordPress site owners are having this issue. [https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors?replies=14#p](https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors?replies=14#p)
   > ost-6323305
   > We are going on 3 days of downtime. If I am unable to get proper resolution
   > today, I will be forced to start taking steps to move my sites off of Media
   > Temple.
   > Awaiting (mt) agent response…
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors/#post-5557099)
 * My fingers are crossed.

Viewing 15 replies - 1 through 15 (of 28 total)

1 [2](https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors/page/2/?output_format=md&replies=8)
[→](https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors/page/2/?output_format=md&replies=8)

The topic ‘WordPress Admin PHP FastCGI 502 Bad Gateway Errors’ is closed to new 
replies.

## Tags

 * [502 Bad Gateway](https://wordpress.org/support/topic-tag/502-bad-gateway/)
 * [admin](https://wordpress.org/support/topic-tag/admin/)
 * [fastcgi](https://wordpress.org/support/topic-tag/fastcgi/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 28 replies
 * 6 participants
 * Last reply from: [anmolview_121](https://wordpress.org/support/users/anmolview_121/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-admin-php-fastcgi-502-bad-gateway-errors/page/2/#post-5557205)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
