Changing default PHP CLI version

Table of ContentsAccess server Domain group Displaying access server default PHP Selecting access server default PHPMageStack comes complete with all versions of PHP installed and usable as standard - and the version of PHP may vary depending on the scope that you are working within, be it the access server or web server. The power … Continue reading

Implementing cron for Magento 2

Table of ContentsSetting up the crontab ExamplesUsing the enhanced cron.sh wrapper Magento 2 does not come supplied with a cron.sh wrapper, and the default Magento cron documentation has some limitations, as it doesn't support email alerts or logging; and there are some edge cases that running the cron from the wider acc server may pose … Continue reading

Securely running cron tasks

Table of ContentsRunning custom tasks Examples Re Index every X hoursThe isolation of web server and access server in MageStack provides excellent security for your SSH/FTP (access) environment from that of the web. The automated element that connects the web server, to the access server is the Magento document root, specifically, the Magento cron. It … Continue reading

Using logrotate to manage Magento logs

Logrotate is a powerful utility built into Linux as standard and can make light work of rotating Magento logs to keep them small, it is also extremely easy to implement. Simple create a file in /etc/logrotate.d/magento-example.com with the following content (replacing example and example.com as necessary), /microcloud/domains/example/domains/example.com/www/var/log/*.log { daily rotate 7 missingok compress copytruncate notifempty … Continue reading

Implementing cron for Magento 1

Table of ContentsSetting up the crontab Using the whitelist/blacklist Examples Re Index every X hours Prune Redis every X hoursUsing the enhanced cron.sh wrapper The default Magento cron.sh wrapper has some limitations, as it doesn't support email alerts or logging; and there are some edge cases that running the cron from the wider acc server … Continue reading

Purging the Redis cache via CLI

Table of ContentsDefault instances To flush all databases To flush a single databaseUsing telnet, you can execute remote commands on the Redis daemon; being able to flush database by command line can be essential if your Magento access is somehow compromised. Default instances By default, there are 2 Redis instances, if you have installed Redis … Continue reading

Magento CLI Installer

Table of ContentsExamples 1.9.0.1 Download and install, with sample dataYou can use the mage-install utility to perform a completely automated Magento installation. mage-install.sh Usage: mage-install.sh -r [magento release] -l [hostname] -u [username] -p [password] -n [database name] ((-s) -e [email] -u [url]) Required -r [0-9.]+ Magento release (eg. 1.9.0.1) -l hostname Database server hostname (eg. … Continue reading