<p>Only upload the /web folder to the /public_html folder. </p>

<p>All other folders should be one level lower so they're not publicly accessible. </p>

<p>Personally, I'm also wondering why not everything resides in a nice clean /craft folder anymore. Now the craft directories are listed amongst a bunch of other stuff on a lowerlevel directory. It's probably the only one really strange architectural choice. I guess P&amp;T is not using WHM/Cpanel etc. </p>

<p>Anyway: do not upload anything except /web in your public folder. </p>

<p>If you do it like this, the index will work correctly out of the box, since it'll be looking for the /app and all folders one level lower then the /public_html by default. </p>

CC BY-SA 4.0
2018-05-12T18:13:51.210Z
No it doesn't.... WHM/Cpanel, one of the most popular control pannels, with or without composer, it creates this mess. There's a vendor folder alright, but all the rest is mixed. I find this a very, VERY, poor choice of implementation.
tom
CC BY-SA 3.0
2018-04-11T05:11:01.883Z
That's because the clean way to install Craft is via composer and the composer puts everything into the `vendor`  folder. It's much better the way it is now.
Robin Schambach
CC BY-SA 3.0
2018-04-10T21:22:18.973Z
2018-04-10T21:22:18.973Z
tom
<p>You can place it in a dedicated craft folder or a private_html folder with composer, but then you have to edit the index.php file a bit to make it work. See <a href="https://craftcms.stackexchange.com/questions/25504/setup-craft-3-when-de-craft-folder-is-above-public-html-on-shared-hosting">Setup Craft 3 when de craft folder is above public_html on shared hosting</a> </p>

CC BY-SA 3.0
2018-04-14T20:44:05.107Z
didn't work for me. I had to set the path in the index.php file like this: `define('CRAFT_BASE_PATH', '../../craft folder above public_html');`
TomS
CC BY-SA 3.0
2018-04-16T11:47:08.487Z
The easiest thing to do would be to insert the full path, avoiding any confusion, like so:

    define('CRAFT_BASE_PATH', ('/home/pathToCraftFolder/craft'));
noregt
CC BY-SA 3.0
2018-04-11T06:28:14.100Z
2018-04-11T06:28:14.100Z
noregt
<p>My hoster has i public html folder where all websites are lying. Different Websites are separeted by subfolders. Should i upload all Craft3 installation files to this public html folder and point the webserver to the /web folder?</p>

<p>Or should i upload only the /web folder to my webhoster's public html folder and place all other files ABOVE, like it's explained in the <a href="https://docs.craftcms.com/v2/installing.html" rel="nofollow noreferrer">Craft 2 installation guide</a>? 
If yes, how do i configure the craft path in the index.php file?</p>

<p>Thank you very much for a explanation!</p>

<craft3><installation>
Craft 3 upload path on webserver
# Craft 3 upload path on webserver

(Asked by: username_0 on 2018-04-10)

My hoster has i public html folder where all websites are lying. Different Websites are separeted by subfolders. Should i upload all Craft3 installation files to this public html folder and point the webserver to the /web folder?

Or should i upload only the /web folder to my webhoster's public html folder and place all other files ABOVE, like it's explained in the [Craft 2 installation guide](https://docs.craftcms.com/v2/installing.html)?
If yes, how do i configure the craft path in the index.php file?

Thank you very much for a explanation!

**Tags:** craft3, installation


---

## 2 answers

### Answer by username_1 on 2018-04-10. Score: 3 | Accepted answer

Only upload the /web folder to the /public\_html folder.

All other folders should be one level lower so they're not publicly accessible.

Personally, I'm also wondering why not everything resides in a nice clean /craft folder anymore. Now the craft directories are listed amongst a bunch of other stuff on a lowerlevel directory. It's probably the only one really strange architectural choice. I guess P&T is not using WHM/Cpanel etc.

Anyway: do not upload anything except /web in your public folder.

If you do it like this, the index will work correctly out of the box, since it'll be looking for the /app and all folders one level lower then the /public\_html by default.

> **Comments:**
> **username_2**: That's because the clean way to install Craft is via composer and the composer puts everything into the `vendor`  folder. It's much better the way it is now.  
> **username_1**: No it doesn't.... WHM/Cpanel, one of the most popular control pannels, with or without composer, it creates this mess. There's a vendor folder alright, but all the rest is mixed. I find this a very, VERY, poor choice of implementation.  

---

### Answer by username_3 on 2018-04-11. Score: 0

You can place it in a dedicated craft folder or a private\_html folder with composer, but then you have to edit the index.php file a bit to make it work. See [Setup Craft 3 when de craft folder is above public\_html on shared hosting](https://craftcms.stackexchange.com/questions/25504/setup-craft-3-when-de-craft-folder-is-above-public-html-on-shared-hosting)

> **Comments:**
> **username_0**: didn't work for me. I had to set the path in the index.php file like this: `define('CRAFT_BASE_PATH', '../../craft folder above public_html');`  
> **username_3**: The easiest thing to do would be to insert the full path, avoiding any confusion, like so:      define('CRAFT_BASE_PATH', ('/home/pathToCraftFolder/craft'));  

---

