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 enable automatic system updates on your servers. The update service allows you to download the latest version of the platform and the CMS, as well as update the license after renewal. It is recommended to use automatic system updates on high-load servers with caution, since this may coincide with a period of critical load on the server.
Deploying an automatic update service
The update process is handled by 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 specifically in the hidden www-data directory, and not in the publicly accessible www one.
Configure the config.php file according to your requirements:
- In the
licenseparameter, set the license key from the personal account - In the
networksparameter, set a list of folders with installed AlterCPA platforms, without the full path - In the
sitesparameter, similarly set a list of site storage folders
The remaining parameters can be left at their default values, since they most often meet your requirements.
In the root scheduler settings (the 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 number in the range 1-59. This determines at which minute of the hour the update check will run. 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 perform the upgrade only during periods of minimum load on your network.
- Make a backup!
- Upload the contents of the
work/corefolder from the downloaded distribution to the platform folder, replacing the existing files. It is also recommended that you periodically update thework/helpfolder to keep the help files up to date. - All database updates will be applied automatically within a minute; this can cause a high load on the server.
- If the version file is uploaded before the update files, some functions may stop working and you will see error messages, for example, when creating or editing an offer. In this case, update the database manually using the “Diagnostics” section in the network settings.
- Upload the contents of the
shop/cmsfolder from the downloaded distribution to the site storage folder, replacing the existing files.
After uploading the files from the core folder to the server, restart PHP-FPM by running the following command (depending on your PHP version):
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 the following commands:
apt update apt upgrade -y apt dist-upgrade -y