3

My WordPress site is using CloudFlare as a CDN, and if I use the site's IP address to access wordpress/wp-admin/install.php directly, it works fine.

However, when I try to call wordpress/wp-admin/install.php using my site's domain with CloudFlare, it always reports a "500 Internal Server Error".

I uploaded all my WordPress files to wordpress/, and tried everything given in this tutorial: How to Fix the Internal Server Error in WordPress, such as:

  1. Checking for Corrupt .htaccess File
  2. Increasing the PHP Memory Limit
  3. Deactivate all Plugins
  4. Re-uploading Core Files

But received the same error. The link above says:

If increasing the PHP memory limit did not fix the issue for you, then you are in for some hard-core trouble shooting.

The error log has:

[Mon Jan 26 00:26:16.850503 2015] [fcgid:warn]
    [pid 8162] (104)Connection reset by peer: [client 173.245.48.159:53072]
    mod_fcgid: error reading data from FastCGI server

[Mon Jan 26 00:26:16.850625 2015] [core:error]
    [pid 8162] [client 173.245.48.159:53072]
    End of script output before headers: install.php

Does anyone know how to solve this issue with accessing WorldPress behind CloudFlare?

  • 1
    can you run a simple hello world example in test.php file? – Nikhil Supekar Jan 26 '15 at 6:16
  • It seems the OP can access PHP files like wordpress/wp-admin/install.php via an IP address, but not behind CloudFlare, so it doesn't seem like it's a PHP issue on the server, even though the error log might suggest so. It's likely that CloudFlare's caching is the culprit. – dan Jan 26 '15 at 9:38
4

As covered here, create a Page Rule for URLs containing the wp-admin and wp-login directories to prevent CloudFlare from caching them.

Also, disable Rocket Loader, as it may inadvertently break certain functions (editors, etc.) in your WordPress back end.

Also try changing these other settings in your CloudFlare account under Performance Settings:

  • Performance profile -> CDN only
  • Caching level -> Basic
  • Auto Minify (Web optimization) -> (Disable all for now)

Lastly, make sure that none of CloudFlare’s IP ranges are blocked by your server (e.g., Apache .htaccess, security modules, or firewall), as covered in number 5 here.

Once you get things accessible, as with just using your IP address alone (i.e., bypassing CloudFlare's proxy), then you can try re-enabling each of the above settings until the error is reproduced, and leave just that setting disabled.

  • This. CloudFlare does not always play nicely with WordPress sites. – JCL1178 Jan 27 '15 at 0:14
  • Yep, it can be a challenge sometimes. There's a CloudFlare plugin, but it's still difficult to predict how different themes will work with it. It's probably best to disable caching altogether (unless you test thoroughly), and just benefit from the DNS, Flexible SSL, and other benefits of using CloudFlare. – dan Jan 27 '15 at 1:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.