Difference between revisions of "CiviCRM/WordPress"

From Freephile Wiki
Jump to navigation Jump to search
Line 64: Line 64:
 
sudo su -
 
sudo su -
 
/home/greg/bin/backup.db.sh wordpress
 
/home/greg/bin/backup.db.sh wordpress
 
 
# Ctrl+D logout
 
 
# set some variables
 
# set some variables
 
docroot=/var/www/html
 
docroot=/var/www/html
Line 75: Line 72:
 
cp $config ~/civicrm.settings.php.bak
 
cp $config ~/civicrm.settings.php.bak
 
backup=/tmp/html.backup
 
backup=/tmp/html.backup
mkdir $backup && sudo chown www-data:www-data $backup
+
mkdir $backup && chown www-data:www-data $backup
 
sudo -u www-data cp -ar /var/www/html $backup
 
sudo -u www-data cp -ar /var/www/html $backup
 
package=https://download.civicrm.org/civicrm-5.3.0-wordpress.zip
 
package=https://download.civicrm.org/civicrm-5.3.0-wordpress.zip
 
wget $package
 
wget $package
sudo rm -rf $pluginroot/civicrm && sudo -u www-data unzip $package -d $pluginroot
+
rm -rf $pluginroot/civicrm && sudo -u www-data unzip $package -d $pluginroot
rm -r $templates/
+
rm -rf $templates/
 
# upgrade the database by visiting the URL in your browser
 
# upgrade the database by visiting the URL in your browser
 
/admin.php?page=CiviCRM&q=civicrm/upgrade&reset=1
 
/admin.php?page=CiviCRM&q=civicrm/upgrade&reset=1
  
 
# test and then cleanup or revert
 
# test and then cleanup or revert
rm $package
+
rm $(basename $package)
 
rm ~/civicrm.settings.php.bak
 
rm ~/civicrm.settings.php.bak
sudo rm -rf $backup
+
rm -rf $backup
 
</source>
 
</source>

Revision as of 02:55, 12 July 2018