<p>What you'll want to do is change the <code>CRAFT_BASE_PATH</code> in your <strong>index.php</strong> file. </p>

<p>Look for line 7, and change this: </p>

<p><code>define('CRAFT_BASE_PATH', dirname("__DIR__"));</code></p>

<p>to this: </p>

<p><code>define('CRAFT_BASE_PATH', dirname('./'));</code></p>

<p>I had this issue as well, being used to doing the same thing with Craft 2, changing the $craftPath variable.</p>

CC BY-SA 3.0
2018-02-19T22:10:51.973Z
Thanks Thabang. I had to do this: _define('CRAFT_BASE_PATH', ('/home/pathToCraftFolder/craft'));_ - notice I removed the 'dirname' and just put the full path in directly. @RobinSchumach - I wasn't clear exactly where the Craft folder and "web" files should go by default. I put Craft above the webroot as I always do, and webroot is public_html as is common on Apache servers.
4midori
CC BY-SA 3.0
2018-02-17T20:15:08.973Z
2018-02-17T20:15:08.973Z
Thabang Chukura
<p>Thank you so much @4midori, this worked for me (installed Craft3 without Composer):</p>

<pre><code>define('CRAFT_BASE_PATH', ('/home/pathToCraftFolder/craft'));
</code></pre>

CC BY-SA 3.0
2018-04-12T04:21:06.320Z
2018-04-12T04:21:06.320Z
Richard Songo
<p>I've just installed Craft 3 RC with Composer. Everything went fine. I moved the contents of the <strong>web</strong> directory to the public_html folder.</p>

<p><em>domain.com/admin</em>
and
<em>domain.com</em></p>

<p>both give blank screens. Where should I start my troubleshooting?</p>

<p>Folder structure</p>

<pre><code>.composer
craft
  config
  modules
  storage
  etc...
public_html
  /cpresources
  .htaccess
  index.php
  web.config
  test.php
</code></pre>

<p>If I add an index.html to the public_html folder, I can access it via domain.com, but I cannot access domain.com/test.php from public_html.</p>

<p>Thanks,
Ben</p>

CC BY-SA 3.0
2018-02-14T21:54:35.590Z
It might be a good idea to show us your folder structure so we know where your `public_html` folder is. When you create a new php file in this folder, can you access that one? Does your server point to that folder?
Robin Schambach
CC BY-SA 3.0
2018-02-14T23:40:54.050Z
What is in your Craft folder and why did you create one? Craft 3 composer installer doesn't create a Craft but a vendor folder as far as I know. Anyway I think your question is more "how to set up a server" and not "how to set up a server for Craft". It seems like it can't proceed php files. Could you please open your servers error log and see if something is in there?
Robin Schambach
CC BY-SA 3.0
2018-02-15T21:49:52.763Z
I've updated the folder structure in my original post. The craft folder contains all of Craft's stuff - config, modules, etc. So - I can't load a simple test.php file, and the error log shows: 
_[15-Feb-2018 12:08:44 America/Detroit] PHP Fatal error:  require_once(): Failed opening required '/chroot/home/eventsce/events.cenic.org/vendor/autoload.php' (include_path='.:/opt/nexcess/php70u/root/usr/share/pear:/opt/nexcess/php70u/root/usr/share/php:/usr/share/pear:/usr/share/php') in /chroot/home/eventsce/events.cenic.org/html/index.php on line 11_
4midori
CC BY-SA 3.0
2018-02-16T15:48:02.350Z
Update - I can load a test.php file, but still getting the above error in log when trying to access the site (domain.com).
4midori
CC BY-SA 3.0
2018-02-16T15:50:08.633Z
This is because you moved your files without knowing what to do. You should not touch a system when you have no clue what it means. As soon as you move your files back to where they supposed to be it will work. The other way is to change your Craft path according to where you inserted the files from your web folder
Robin Schambach
<craft3><install>
Blank screen for /admin and public site with Craft 3
# Blank screen for /admin and public site with Craft 3

(Asked by: username_0 on 2018-02-14)

I've just installed Craft 3 RC with Composer. Everything went fine. I moved the contents of the web directory to the public_html folder.
domain.com/admin
and
domain.com
both give blank screens. Where should I start my troubleshooting?
Folder structure
.composer
craft
  config
  modules
  storage
  etc...
public_html
  /cpresources
  .htaccess
  index.php
  web.config
  test.php

If I add an index.html to the public_html folder, I can access it via domain.com, but I cannot access domain.com/test.php from public_html.
Thanks,
Ben

**Tags:** craft3, install

> **Comments:**
> **username_1**: It might be a good idea to show us your folder structure so we know where your `public_html` folder is. When you create a new php file in this folder, can you access that one? Does your server point to that folder?  
> **username_1**: What is in your Craft folder and why did you create one? Craft 3 composer installer doesn't create a Craft but a vendor folder as far as I know. Anyway I think your question is more "how to set up a server" and not "how to set up a server for Craft". It seems like it can't proceed php files. Could you please open your servers error log and see if something is in there?  
> **username_0**: I've updated the folder structure in my original post. The craft folder contains all of Craft's stuff - config, modules, etc. So - I can't load a simple test.php file, and the error log shows:  _[15-Feb-2018 12:08:44 America/Detroit] PHP Fatal error:  require_once(): Failed opening required '/chroot/home/eventsce/events.cenic.org/vendor/autoload.php' (include_path='.:/opt/nexcess/php70u/root/usr/share/pear:/opt/nexcess/php70u/root/usr/share/php:/usr/share/pear:/usr/share/php') in /chroot/home/eventsce/events.cenic.org/html/index.php on line 11_  
> **username_0**: Update - I can load a test.php file, but still getting the above error in log when trying to access the site (domain.com).  
> **username_1**: This is because you moved your files without knowing what to do. You should not touch a system when you have no clue what it means. As soon as you move your files back to where they supposed to be it will work. The other way is to change your Craft path according to where you inserted the files from your web folder  

---

## 2 answers

### Answer by username_2 on 2018-02-17. Score: 2 | Accepted answer

What you'll want to do is change the `CRAFT_BASE_PATH` in your **index.php** file.

Look for line 7, and change this:

`define('CRAFT_BASE_PATH', dirname("__DIR__"));`

to this:

`define('CRAFT_BASE_PATH', dirname('./'));`

I had this issue as well, being used to doing the same thing with Craft 2, changing the $craftPath variable.

> **Comments:**
> **username_0**: Thanks Thabang. I had to do this: _define('CRAFT_BASE_PATH', ('/home/pathToCraftFolder/craft'));_ - notice I removed the 'dirname' and just put the full path in directly. @RobinSchumach - I wasn't clear exactly where the Craft folder and "web" files should go by default. I put Craft above the webroot as I always do, and webroot is public_html as is common on Apache servers.  

---

### Answer by username_3 on 2018-04-12. Score: 1

Thank you so much @username_0, this worked for me (installed Craft3 without Composer):
define('CRAFT_BASE_PATH', ('/home/pathToCraftFolder/craft'));


---

