I would like to learn Craft 3 CMS.
I would like to do so by installing it manually on shared hosting. I am not familiar with Composer and would like to learn Craft before committing to learning Composer.
I do not understand some of the steps given at: https://docs.craftcms.com/v3/installation.html
So I searched for manual installation of Craft 3 on shared hosting on the net and did not find any helpful articles. Examples on the net are based on using Composer or Craft 2 or using a local dev environment, etc.
So I have come here hoping that some people will help me out with the steps I don't understand at: https://docs.craftcms.com/v3/installation.html
Here we go:
Extract the archive wherever you want your new Craft project to live.
In my case my shared hosting provides me with the following directory structure:
/home/[accountname]/public_html
I am used to developing with Wordpress and if I use shared hosting I will simply put all of WP in a folder named the same as the domain, eg:
/home/[accountname]/public_html/example.com
So I am not sure where I should upload the Craft files to, also because of the next step below.
Directory Structure
Once Craft’s files are in place, your project directory should have a directory structure like this:
my-project.test/ ├── config/ │ └── ... ├── storage/ │ └── ... ├── templates/ │ └── ... ├── vendor/ │ └── ... ├── web/ │ └── ... ├── .env ├── .env.example ├── composer.json ├── craft └── craft.bat
TIP
The web/ folder represents your site’s webroot, and it can be renamed to whatever you want (www/, public/, public_html/, etc.). "
If I were to install these files in eg:
/home/[accountname]/public_html/my-project.test/
Then this becomes confusing to me because I once managed to install Craft 2 on shared hosting and Craft 2 installation instructions made it clear that I had to install most of Craft 2 above the webroot:
/home/[accountname]/craft/
And I had the craft webroot at /home/[accountname]/public_html/craftsite/
But if I upload craft to:
/home/[accountname]/public_html/my-project.test/
Then obviously all of Craft is under not above the webroot. I imagine this could be very insecure....
But the Craft 3 instructions do not mention that I need to install some folders above the webroot.
I also feel I have 2 webroots now:
My shared hosting tells me that I have a webroot at: /home/[accountname]/public_html/
While Craft is saying my webroot is: /home/[accountname]/public_html/my-project.test/web/
Maybe I need to install Craft 3 above the webroot, eg:
/home/[accountname]/my-project.test/
And then the Craft webroot would be:
/home/[accountname]/my-project.test/web/
But I also have a webroot at:
/home/[accountname]/public_html/
So now I also have 2 webroots....
Step 5: Set up the Web Server
Create a new web server to host your Craft project. Its document root (or “webroot”) should point to your web/ directory (or whatever you’ve renamed it to).
I my case I dont believe I can create a web server - I am stuck with the shared hosting server.
So I am not sure how to handle this step.
I am sorry if I am missing some very obvious things here.....
Any help would be very much appreciated.....
web
folder above yourpublic_html
. Once that's done, upload the content of theweb
folder (index.php
and.htaccess
, not the folder itself) in yourpublic_html
.