I am having problems installing my module in magento2 I copy my module to app/code and execute :
php bin/magento setup:upgrade
And then when I try to access my magento i get an empty page and nothing works after that:
But if I execute this commands as root everything works fine:
rm -rf pub/static/* var/* generated/*; chmod 0777 var/ pub/ generated/; chmod 0777 -R var/ generated/ pub/; php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f php bin/magento indexer:reindex php bin/magento cache:clean php bin/magento cache:flush
I don't really understand all this commands and what they exactly do, I don't want to execute something I don't understand because it's too risky.
Can someone explain to me this commands, are they safe to execute and is there a safer and simple way to install a module.