Blank screen for /admin and public site with Craft 3

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.

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

• 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 Feb 14 '18 at 21:54
• 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 Feb 14 '18 at 23:40
• 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 Feb 15 '18 at 21:49
• 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 Feb 16 '18 at 15:48
• 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 Feb 16 '18 at 15:50

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.

• 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 Feb 19 '18 at 22:10

Thank you so much @4midori, this worked for me (installed Craft3 without Composer):

define('CRAFT_BASE_PATH', ('/home/pathToCraftFolder/craft'));