CiviCRM/WordPress: Difference between revisions

No edit summary
m Text replacement - "<(\/?)source" to "<$1syntaxhighlight"
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{CompanyName}} setup CiviCRM on top of WordPress for Coastal Trails Coalition in order to substantially improve operations.
{{CompanyName}} setup CiviCRM on top of WordPress for Coastal Trails Coalition in order to substantially improve operations.


CiviCRM gives us all benefits and capabilities of a large commercial CRM and donor management system completely free of licensing costs. CiviCRM allows non-profits to benefit from an integrated solution for donor management, events, bulk email, etc. substantially increasing their effectiveness as compared to managing a variety of non-
CiviCRM gives us all benefits and capabilities of a large commercial CRM and donor management system completely free of licensing costs. CiviCRM allows non-profits to benefit from an integrated solution for donor management, events, bulk email, etc. substantially increasing their effectiveness as compared to managing a variety of non-


So, what in particular did I need to do in order to setup CiviCRM, and test or convert operations?  This article with explore and document that effort.
So, what in particular did I need to do in order to setup CiviCRM, and test or convert operations?  This article with explore and document that effort.
Line 7: Line 7:
== Installation ==
== Installation ==


The [http://wiki.civicrm.org/confluence/display/CRMDOC/Installing+CiviCRM+for+WordPress#InstallingCiviCRMforWordPress-PluginIssues instructions] are well-written and easy to follow. On DreamHost, I logged in to my [https://panel.dreamhost.com control panel] and created a new database called ''coastal_crm'' The only downside was that the very popular "JetPack" plugin for WordPress is listed as incompatible with the CiviCRM plugin.  So I disabled the JetPack plugin.
The [https://docs.civicrm.org/sysadmin/en/latest/install/wordpress/#InstallingCiviCRMforWordPress-PluginIssues instructions] are well-written and easy to follow <ref>There is an issue on GitHub discussing simplifying the instructions down to the "essentials for routine installs"; with notes about edge cases. https://github.com/civicrm/civicrm-sysadmin-guide/issues/52#issuecomment-404952171</ref>.
 
Some of the '''help''' content from `wp civicrm --help`
<pre>
  wp civicrm install
  ===============
  Command for to install CiviCRM.  The install command requires that you have downloaded a
  tarball or zip file first.
  Options:
  --dbhost            MySQL host for your WordPress/CiviCRM database. Defaults to localhost.
  --dbname            MySQL database name of your WordPress/CiviCRM database.
  --dbpass            MySQL password for your WordPress/CiviCRM database.
  --dbuser            MySQL username for your WordPress/CiviCRM database.
  --lang              Default language to use for installation.
  --langtarfile      Path to your l10n tar.gz file.
  --site_url          Base Url for your WordPress/CiviCRM website without http ( e.g.
  mysite.com )
  --ssl              Using ssl for your WordPress/CiviCRM website if set to on ( e.g.
  --ssl=on )
  --tarfile          Path to your CiviCRM tar.gz file.
</pre>
 
On DreamHost, I logged in to my [https://panel.dreamhost.com control panel] and created a new database called ''coastal_crm'' The only downside was that the very popular "JetPack" plugin for WordPress is listed as incompatible with the CiviCRM plugin.  So I disabled the JetPack plugin.


== After initial install ==
== After initial install ==
Line 55: Line 77:


=== Using WP-CLI to upgrade plugins ===
=== Using WP-CLI to upgrade plugins ===
# go to the document root
# go to the document root <pre>cd /var/www/html</pre>
cd /var/www/html
# update all the plugins with wp-cli <pre>sudo -u www-data wp plugin update --all</pre>
# update all the plugins with wp-cli
 
sudo -u www-data wp plugin update --all
=== Using WP-CLI to upgrade CiviCRM ===
<pre>
wp civicrm upgrade
  ==================
  Take backups, replace CiviCRM codebase with new specified tarfile and upgrade database by
  executing the CiviCRM upgrade process - civicrm/upgrade?reset=1. Use civicrm-restore to
  revert to previous state in case anything goes wrong.
</pre>


=== Start with a db backup ===
=== Traditional-style procedure ===
<source lang="bash">
<syntaxhighlight lang="bash">
sudo su -
sudo su -
/home/greg/bin/backup.db.sh wordpress
/home/greg/bin/backup.db.sh wordpress
Line 85: Line 114:
rm ~/civicrm.settings.php.bak
rm ~/civicrm.settings.php.bak
rm -rf $backup
rm -rf $backup
</source>
</syntaxhighlight>