0

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.....

5
  • 1
    Try to upload all the files except the web folder above your public_html. Once that's done, upload the content of the web folder (index.php and .htaccess, not the folder itself) in your public_html.
    – Oli
    Commented Apr 16, 2020 at 8:18
  • Thanks very much Oli I will try that.
    – ironfish
    Commented Apr 16, 2020 at 10:57
  • My only other question then becomes - If I upload all the files above public_html except web folder, and I have more than one Craft site, can I use those same folders above public_html for multiple Craft sites? In other words can they be shared across Craft sites?
    – ironfish
    Commented Apr 16, 2020 at 10:58
  • It depends on your definition of multiple sites. If they are unrelated websites, for different clients then you would have separate hosting and therefore separate Craft installs for each website. Craft does support multi-sites but that is for a single company that has multiple related websites. For instance a company could have two main products and each product has its own domain and website but both are edited by the same team. In which case you can use the Sites facility and all sites would then use the same Craft install.
    – JollyR
    Commented Apr 20, 2020 at 17:14
  • JollyR a belated thanks. My sites would be independent. In the meantime I have asked my hosting company and they cleared it up for me.
    – ironfish
    Commented Apr 27, 2020 at 11:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.