Set Magento 2 in Production Mode
To see current mode in Magento 2, run php bin/magento deploy:mode:show Example To set Magento 2 in production mode, run
Magento 2 Change Email of an Admin user
To change email address of an admin user, run following SQL in MySQL command promt or in phpMyAdmin update admin_user
Magento 2 Disable Two-Factor Authentication
Magento 2.4.0 come with Two-Factor authentication. Once you installed Magento 2.4.0 or latest you will be asked to setup Two-Factor
journalctl
To see systemd logs, run journalctl -f To see a service specific logs (example postfix) journalctl -f -u postfix To
Magento 2
Magento 2 list enabled modules Magento 2 Enable SSL Magento 2 CLI Magento 2 Disable Two-Factor Authentication Magento 2 Change
Magento 2 list enabled modules
To list Modules in Magento 2, run php bin/magento module:status Example [markt-24@server public_html]$ php bin/magento module:status List of enabled modules:
Install elasticsearch on CentOS 7
To install elasticsearch, first install java yum -y install java-1.8.0-openjdk Import key rpm –import https://artifacts.elastic.co/GPG-KEY-elasticsearch Create file vi /etc/yum.repos.d/elasticsearch.repo Paste
Change PHP version in Virtualmin Server
To change PHP version for a web site hosted in Virtualmin, click on the Virtualmin tab. Select the domain from
SSL Life Time Reduced to 397 days
Due to changes in Apple, Mozilla and Google Root Store Policies, as of September 1, 2020, newly issued SSL/TLS certificates
Mount Amazon s3 on Linux
To mount Amazon S3 bucket as a filesystem on linux, you can use s3fs. https://github.com/s3fs-fuse/s3fs-fuse To install s3fs on Ubuntu/Debian,
fatal: open /etc/postfix/main.cf: Permission denied
On a CentOS server, when sending mail from PHP scripts, mail failed to work. On checking postfix log file (/var/log/maillog),
Protecting files with noclobber
To protect files on Linux by accidently overwritten by > operator, you can use set -o noclobber Now if you