Skip to content

Patrick

Efficiency When Using Magento 2 Setup Commnds

Magento 2 requires a set of commands to be run after various changes to its installation, whether it be introducing a new extension or upgrading a current one. The following commands required to be run, and commonly run one after the other, are:

bin/magento setup:upgrade
bin/magento setup:static-content:deploy
bin/magento setup:di:compile

In the past I’ve been able to run these commands with little issue, but recently on one particular client’s multi-website Magento 2 installation, which has large cron jobs and higher traffic, the commands caused extremely high CPU usage. It seemed that running the commands with the other regular Magento 2 processes occurring in the background caused severe slow downs and regular site outages until PHP was restarted. In turn, this caused much frustration from both myself, the hosting company, and most importantly the client, who was losing dollars each time customers were unable to make purchases through their sites.Read More »Efficiency When Using Magento 2 Setup Commnds

Magento 2 File and Folder Permissions

Magento 2 requires specific permissions on the files and folders within its structure, along with correct ownership properties, to function properly. The owner of the file/folder system should have full control properties on all files and folders, meaning read/write/execute. Along with those properties, the specific permissions needed can be set using the following commands in the root directory of the Magento 2 installation: find . -type f -exec chmod 644 {} \; find . -type d -exec chmod 755 {} \; chmod u+x bin/magento