11

If I have PHP installed on nginx, and Wordpress installed too, can I still run CiviCRM as a Wordpress Plugin?

10

Yes, CiviCRM works fine with WordPress on Nginx. However, since Nginx doesn't use .htaccess you'll want to add any changes to your site-specific configuration.

For example, there are a few upload directories that have .htaccess files denying access to their contents. To do the same thing in Nginx, you'd want to add a location block to your site's configuration.

location ~* ^/wp-content/plugins/files/civicrm/(?:ConfigAndLog|custom|upload|templates_c) {
  access_log off;
  return 404;
}

See more details in my blog post: https://blog.rudeotter.com/install-civicrm-on-wordpress-with-nginx/

9

No problems here. My local Wordpress dev environment (vvv) uses nginx and I've had no problems with Civi.

  • Just want to add that from the Drupal side of things CiviCRM works great on BOA systems, which use nginx. github.com/omega8cc/boa I'm running several production CiviCRM instances for 2+ years now with no issues. – Link Swanson Mar 30 '15 at 18:42
8

Detailed install and configuration tutorial was just posted here: https://blog.rudeotter.com/install-civicrm-on-wordpress-with-nginx/

  • Thanks, Dave. I wrote that article and I'm glad others find it useful! Just a quick followup, I run a few CiviCRM instances for clients on both WordPress and Drupal using Nginx and haven't had any trouble. You'll just want to keep in mind that Nginx doesn't use .htaccess files so some rules you'll have to include in your site-specific configuration. – James Bradach Mar 25 '15 at 4:03
3

Yes all fine, but a quick note that you may need to add an extra line to the NGINX config file to set the CiviCRM file folder to not be accessible from the web as the .htaccess file will no longer block this folder otherwise your clients files that they upload against activities etc can be found.

1

Yes. It is compatible. For the longest time I thought my server was using Apache, until I discovered it is using nginx. Haven't noticed any differences.

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.