Skip to content

How to install Magento so the store displays on my domain root in shared hosting?

I’m trying to install Magento Open Source on my shared hosting server and want the store to display when I visit my domain. I used the following command:

bin/magento setup:install 
--base-url=https://mydomain.com/ 
--db-host=localhost 
--db-name=magento 
--db-user=magento 
--db-password=magento_password 
--admin-firstname=admin 
--admin-lastname=admin 
[email protected] 
--admin-user=admin 
--admin-password=admin123 
--language=en_US 
--currency=USD 
--timezone=America/Chicago 
--use-rewrites=1

Unfortunately, I still see the default page of my web hosting service. The public_html directory only contains the default welcome.html file, while all Magento files have been installed in the user directory (parent of public_html).

How can I correctly install Magento so that it displays on my root domain? Also, how can I remove the incorrectly installed files from the user directory?

Thanks for your help