Updates for AlterCPA come regularly, sometimes several times a day. We recommend always maintaining the current version of the system using automatic updates.

If you used our automatic installation script to deploy the network, automatic updates are already active. You can activate the automatic platform updates on your server. The update service allows you to download the latest version of the platform and the CMS, as well as update the license after extension. It is recommended to use the automatic update of the system on high-loaded servers as carefully, since it may coincide with the critical load period to the server.

Deploying an automatic update service

The update process corresponds to a separate service that is configured on your servers.

To deploy the automatic update service, you will need the contents of the toolz folder from the distribution. Copy the toolz folder to the /var/www-data directory of your server. It is recommended to place this folder in the hidden catalog of the www-data, and not in publicly available www.

Configure the config.php file according to your requirements:

  • In the license parameter, set the license key from the personal account
  • In the networks parameter set a list of folders with installed AlterCPA platforms, without full path
  • In the sites parameter similarly, set a list of site repositories

The remaining parameters can be left by default, since they most often comply with your requirements.

In the root scheduler settings (crontab -e command) add the following parameters:

*/5 * * * * php -f /var/www-data/toolz/license.php && chown -R wsvr:wsvr /var/www >/dev/null 2>&1
33 * * * * bash /var/www-data/toolz/upgrade.sh >/dev/null 2>&1

Very important! Instead of 33, specify any other digit of the range 1-59. This determines which minute the update check will be accompanied. Use a random number.

Manual system upgrade

Note that when you upgrade the platform, you may experience a high load on the database. In addition, there may be temporary problems with getting leads and platform freezes. It is recommended to upgrade only during the minimum load on your network.

  1. Make the backup!
  2. Upload the contents of the work/core folder from the downloaded distribution to the platform folder, replacing the existing files. It is also recommended that you periodically update the work/help folder to keep the help files up to date.
  3. All database updates will be applied automatically within a minute, this can cause a high load on the server.
  4. If the version file is uploaded before the update files, some functions may stop working and you will see error messages when, for example, creating or editing an offer. In this case, update the database manually using the "Diagnostics" section in the network settings.
  5. Upload the contents of the shop/cms folder from the downloaded distribution to the site storage folder, replacing the existing files.

After uploading core folder, restart the PHP-FPM server running the following command (depends on your server software):

service php7.3-fpm restart
service php7.2-fpm restart

Server upgrades

Do not forget to update your servers at least once a month. To do this, run commands:

apt update
apt upgrade -y
apt dist-upgrade -y