If I have PHP installed on nginx, and Wordpress installed too, can I still run CiviCRM as a Wordpress Plugin?
5 Answers
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/
-
1It would be great to some documentation on this in the Installation and Upgrade section of the CiviCRM wiki (wiki.civicrm.org/confluence/display/CRMDOC/…)– GrahamCommented Mar 25, 2015 at 15:39
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.– LunkRatCommented Mar 30, 2015 at 18:42
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. Commented Mar 25, 2015 at 4:03
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.
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.