Difference between revisions of "CiviCRM/WordPress"
< CiviCRM
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 | ||
− | |||
− | |||
− | |||
# 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 && | + | 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 | ||
− | + | rm -rf $pluginroot/civicrm && sudo -u www-data unzip $package -d $pluginroot | |
− | rm - | + | 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 | ||
− | + | rm -rf $backup | |
</source> | </source> |