Magento 2 Installation for Cpanel/whm Users

Recently we found many queries regarding deployment of Magento 2 on Cpanel shared hosting, after viewing my previous post CSS/js Image Not showing after Magento 2 Installation user have several queries. One another cause is recent changes in magneto 2.06 file/Directories permissions. I try to create a step by step guid for Cpanel users, (For non cpanel users I will provide later)

1- Get magento 2 version from magento.com and transfer files to your server root directory. (magento recommend composer way to install magento 2 recent version but some cpanel users may not have composer access. if you have composer access please follow magento 2 composer installation).
2- You need to access SSH from your cpanel to follow further procedure(You may required to ask your hosting provider/administrator for ssh access).
3- Magento is very concern about security so file permissions setup prior to install is vey mandatory. You need to change permissions by using these commands.
cd public_html
find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} \;
find var vendor pub/static pub/media app/etc -type d -exec chmod g+w {} \;
chmod u+x bin/magento
You may face operation not permitted issue this is due to Cpanel runs as <CpanelUserName>:noboddy user and which have no permisions. You may require to change public_html directory owner to <CpanelUserName>:<CpanelUserName> by using this Command.
chown -R <CpanelUserName>:<CpanelUserName> public_html
(this command must be run in root directory)
4- Create database, database user connect database with user.
5- Now you are ready to install through Web interface (You can also install it through command line). For web installation navigate to your url in browser and magento installation step will guide you.
6- Now you can set your magento mode or environments as per your requirements, if you going to develop/design your magento store you can put magemnto in development mode and if you are going to use magento as store front, you can change mode to productions (its highly recommended regarding security and optimizations) by default magento install withdefault mode.
you can check current magento mode by
cd public_html
bin/magento deploy:mode:show
For changing mode you can use: 
bin/magento deploy:mode:set developer
bin/magento deploy:mode:set production
upon doing production mode will activate cache, generate static files and will use recommended optimization setting (if your store front not loading Js, css please follow CSS/js Image Not showing after Magento 2 Installation).
Now your magento is install and ready to use, You can login to your admin dashboard and test with creating Category, products etc.
If You required any service regarding magento 2 development please contact directly on email hello@mvisionsolutions.com

Comments

Popular posts from this blog

What are the Top Mobile App UI/UX Design Trends That Will Skyrocket in 2022?

Why does your business need a Mobile Application for Growth?

Al in Healthcare: What's Trending and What's Upcoming