CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • Pros and Cons of having CiviCRM on a WP multisite install
Pages: [1]

Author Topic: Pros and Cons of having CiviCRM on a WP multisite install  (Read 1565 times)

Neil

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
Pros and Cons of having CiviCRM on a WP multisite install
November 12, 2013, 08:47:21 pm
Hello everyone

I have seen some mention of installing Civi and a WP multisite and most of them are several months old.  I am hoping us WP folk, will all learn from this conversation.  What are the current pros and cons of doing this?

Have some of you implemented this and found it to present some challenges?
If so, what have you noticed?

Or has it been problem-free?

Or would you suggest the best practice be to stick with installing Civi on a single WP site?

Personally, without the under-the-hood knowledge, I lean strongly towards the latter.

Looking forward to hearing back from you
Neil with OpenOakland hat on

Erik Stainsby

  • I’m new here
  • *
  • Posts: 28
  • Karma: 1
  • Web+Db Programmer
  • CiviCRM version: 4.4.3 WP plugin
  • CMS version: WP 3.7.1
  • MySQL version: 5.5.34
  • PHP version: 5.3.10-1ubuntu3.8
Re: Pros and Cons of having CiviCRM on a WP multisite install
December 11, 2013, 09:14:06 pm
Hi Neil,

I have experimented with MS WP and Civi and found it ... frustrating. 
First off, Civi requires that you Activate the plugin, so installing as a Must-Use plugin is completely out of the question. This would be my preferred method as it removes the temptation to fiddle from the subsite administrators, by hiding the plugin from the lists of plugins in each site. Ah well, later for that then.

What I have discovered is that Civi will always call the base blog in the network, blog 1.  This means every time your users from any subsite activate a Civi admin page, they are yanked out of their home site, and plopped into the Network site. Not a good thing(tm).  Not only is this disorienting, it may mean you have to grant your editors or other lesser team members access to the Network admin context. Undesirable.

I think what this points out is that - as young as Civi + WP is - it is not yet developed with any thought to managing the WP notion of multisite adn the Network of sites.  For the immediate future I would strongly advise against trying to use it on a production system with multisite enabled.

- Erik

RachelWright

  • I post occasionally
  • **
  • Posts: 78
  • Karma: 3
  • CiviCRM version: 4.2.7
  • CMS version: Joomla 2.5.17
  • MySQL version: 5.5.37
  • PHP version: 5.4.26
Re: Pros and Cons of having CiviCRM on a WP multisite install
July 11, 2014, 11:46:56 am
Have you continued in civi and WP multisite? Just curious if over time you have found it more to your liking. I am swapping from using civi in Joomla to Wordpress and am considering a WP Multisite. Was wondering if it was a good or bad idea.

Upperholme

  • Administrator
  • Ask me questions
  • *****
  • Posts: 568
  • Karma: 8
    • MC3
  • CiviCRM version: 4.x
  • CMS version: Drupal 6.x/7.x, Wordpress, Joomla
Re: Pros and Cons of having CiviCRM on a WP multisite install
September 11, 2014, 03:28:41 am
I'm just looking at the potential and the issues of using Civi with WP Multisite using subdomains.

I would be very grateful if anyone has been down this path already and is able to share any tips and wrinkles they may have learned in the process.
Graham Mitchell
http://mc3.coop

haystack

  • I post occasionally
  • **
  • Posts: 61
  • Karma: 2
  • CiviCRM version: 4.n
  • CMS version: WordPress 4.n
  • MySQL version: 5.n
  • PHP version: 5.n
Re: Pros and Cons of having CiviCRM on a WP multisite install
September 12, 2014, 10:30:31 am
Quote from: Erik Stainsby on December 11, 2013, 09:14:06 pm
First off, Civi requires that you Activate the plugin, so installing as a Must-Use plugin is completely out of the question. This would be my preferred method as it removes the temptation to fiddle from the subsite administrators, by hiding the plugin from the lists of plugins in each site. Ah well, later for that then.

I think there are two scenarios interwoven here. First is where you want to share a single Civi instance across all sites on your network. In this case, Civi can be network-activated which means it doesn't have to be activated on each sub-site. This does mean that the Civi admin menu item is available on the sub-site, but you can easily remove it by removing the plugin's menu item action on sub-sites. One can also do that for the Civi shortcode button on post edit screens.

The second scenario is where you want each sub-site to have its own Civi instance. This is possible because (as I understand it) Civi has multiple "site" capability, though I've only heard of it being implemented in a Drupal context. I have yet to try this out for myself, but in principle it looks like it would be possible to create a Civi-as-a-service system in WordPress where each sub-site has a fresh Civi. The civicrm.settings.php is a bit of a roadblock on the way to this since it doesn't lend itself to the dynamic setting up of Civi.

Quote from: Erik Stainsby on December 11, 2013, 09:14:06 pm
What I have discovered is that Civi will always call the base blog in the network, blog 1.  This means every time your users from any subsite activate a Civi admin page, they are yanked out of their home site, and plopped into the Network site. Not a good thing(tm).  Not only is this disorienting, it may mean you have to grant your editors or other lesser team members access to the Network admin context. Undesirable.

I agree that it's annoying about the URL not respecting the sub-site you may happen to be on. This should not be the case and needs fixing. However, you do not have to grant network admin status to anyone for them to be able to access Civi on the main site - just adjust the Civi permissions to allow access to a role and give that role to the user in question.

haystack

  • I post occasionally
  • **
  • Posts: 61
  • Karma: 2
  • CiviCRM version: 4.n
  • CMS version: WordPress 4.n
  • MySQL version: 5.n
  • PHP version: 5.n
Re: Pros and Cons of having CiviCRM on a WP multisite install
September 12, 2014, 10:50:57 am
Here's a gist that demonstrates how  to manipulate some of the behaviour of the Civi plugin:

https://gist.github.com/christianwach/b39ce223fec1484e9937

haystack

  • I post occasionally
  • **
  • Posts: 61
  • Karma: 2
  • CiviCRM version: 4.n
  • CMS version: WordPress 4.n
  • MySQL version: 5.n
  • PHP version: 5.n
Re: Pros and Cons of having CiviCRM on a WP multisite install
September 12, 2014, 05:48:33 pm
A little more stream-of-consciousness...

First off, I think the scenario where each sub-site has its own clean Civi instance is a fairly distant prospect. Looking at the state of play for Civi multisite http://wiki.civicrm.org/confluence/pages/viewpage.action?pageId=86213708 it seems that quite a lot of data has little if no separation between Civi "domains" when the same database is being used. There's a way to go before one can spin up a fresh, new Civi instance simply by defining a new domain in Civi per WordPress sub-site. There's possibly a way forward through creating a fresh Civi database per WordPress sub-site, but that also looks far from trivial to implement.

Which leaves us with the option to share a single Civi instance across all sites on the network. The question then becomes how to organise this so it makes sense. One Civi instance per WordPress network rather implies that the data in Civi applies equally across the WordPress network. In some situations, then, managing all access to Civi admin through the main site is reasonable...

For example, the scenario I work with most often is where the WordPress multisite network is (or appears to be) a complete site. Sub-sites are spin-offs of the main site, such as BuddyPress Groupblogs and variants thereof. Civi is mostly used to track activity across the network but its functionality is available via the main site. The gist which I posted a link to above contains a plugin that will modify (or rather limit) Civi's behaviour across the network so that sub-sites do not have access to Civi via their admin menu (nor does the shortcode button appear on sub-site post edit screens) although Civi itself can be loaded. So, for example, when a user profile is edited, the changes can be synced to Civi regardless of the site that the changes occurred on. Sitewide operations like mailings happen from the main site, however. This works fine.

I can imagine scenarios where the above does not hold. Say you have an organisation where the main site is dedicated to the umbrella organisation and sub-sites are managed by regional organisations, then your WordPress sub-sites should have a closer relationship with Civi. In this instance, the Civi database would be shared, but sub-site activity would need to be flagged as pertaining to the sub-site in question. This looks like it can be done with "domain groups" in https://github.com/eileenmcnaughton/org.civicrm.multisite/ but I've not tried it.

As things stand, the Civi dashboard will load on WordPress sub-sites, but attempting further navigation will bounce you to the main site because Civi makes assumptions about the WordPress admin url in a number of places, mostly assuming that it is at 'wp-admin/admin.php' which is not the case with, for example, WordPress subfolder multisite installs. I'm not clear about how to remedy this so that the Civi admin pages function as expected on a sub-site.

And then things get even more complex when plugins such as Networks for WordPress https://wordpress.org/plugins/networks-for-wordpress/ or WP Multi Network https://wordpress.org/plugins/wp-multi-network/ are factored in.

In summary, there's a lot of thinking that needs to be done.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • Pros and Cons of having CiviCRM on a WP multisite install

This forum was archived on 2017-11-26.