<p>Hi can anyone tell me if these settings are correct? All I am seeing is a blank page on the front end and the admin url.</p>
<p>This is the structure I have locally and it all works fine:</p>
<pre><code>/Root
    - .env
    - /config
    - /modules
    - /storage
    - /templates
    - /vendor
    - /web
         - /assets
         - /cpresources
         - index.php
</code></pre>
<p>This is the structure I have on remote:</p>
<pre><code>/Root
    - /craft
       - .env
       - /config
       - /modules
       - /storage
       - /templates
       - /vendor
    - /public_html
         - /staging
            - /assets
            - /cpresources
            - index.php    
</code></pre>
<p>I've used PhPmyAdmin and created and uploaded the database and user and imported table data.
In .env Ive changed</p>
<pre><code>DB_DRIVER=mysql
DB_SERVER=127.0.0.1
DB_PORT=8889
DB_DATABASE=sitecms
DB_USER=root
DB_PASSWORD=root
DB_SCHEMA=
DB_TABLE_PREFIX=table_
</code></pre>
<p>to</p>
<pre><code>DB_DRIVER=mysql
DB_SERVER=#.###.##.###[server ip]
DB_PORT=8890
DB_DATABASE=thesite_sitecms
DB_USER=thesite_siteuser
DB_PASSWORD=###########
DB_SCHEMA=
DB_TABLE_PREFIX=table_
</code></pre>
<p>But I don't know how to change the path or what else I need to do. In index.php I have tried changing</p>
<pre><code>define('CRAFT_BASE_PATH', dirname(__DIR__));
</code></pre>
<p>to</p>
<pre><code>define('CRAFT_BASE_PATH', dirname('../../craft'));
</code></pre>
<p>but I'm still just getting a white page with no error. I'm pretty sure the subdomain is set up correctly as I have changed the index.php in the staging folder with some text and I can see that text in the url staging.mydomain.com.</p>
<p>I've also changed in general.php</p>
<pre><code>'@baseUrl' =&gt; 'http://192.168.1.10:8890/',
</code></pre>
<p>to</p>
<pre><code>'@baseUrl' =&gt; 'http://staging.mydomain.com:8890/',
</code></pre>
<p>What am I missing?</p>
<p>Thanks</p>

CC BY-SA 4.0
2021-07-13T13:04:48.360Z
Why would you want to have a different folder structure on the remote? Seems to be inviting a lot of avoidable pain - just make it standard.
James Smith
CC BY-SA 4.0
2021-07-13T13:13:05.640Z
Yes I'm struggling could you give me an answer as to how the structure should be for a subdomain?
cannon303
CC BY-SA 4.0
2021-07-13T13:22:17.417Z
I've recreated my local setup exactly in a subdomain and still getting a blank page.
cannon303
CC BY-SA 4.0
2021-07-14T13:17:02.417Z
It could be lots of different things - you need to ensure `devMode` is switched on in order to see Craft's error messages, and also check your server error log in case there's a problem prior to reaching Craft.
James Smith
CC BY-SA 4.0
2021-07-22T06:52:14.230Z
You sure CRAFT_BASE_PATH is set correctly? You can put a die(CRAFT_BASE_PATH) statement directly after constant definition in the index.php. Also check permissions.
gioppe
<subdomain><staging>
I need help with trying to put craft on a staging subdomain
# I need help with trying to put craft on a staging subdomain

(Asked by: username_0 on 2021-07-13)

Hi can anyone tell me if these settings are correct? All I am seeing is a blank page on the front end and the admin url.
This is the structure I have locally and it all works fine:
/Root
    - .env
    - /config
    - /modules
    - /storage
    - /templates
    - /vendor
    - /web
         - /assets
         - /cpresources
         - index.php

This is the structure I have on remote:
/Root
    - /craft
       - .env
       - /config
       - /modules
       - /storage
       - /templates
       - /vendor
    - /public_html
         - /staging
            - /assets
            - /cpresources
            - index.php    

I've used PhPmyAdmin and created and uploaded the database and user and imported table data.
In .env Ive changed
DB_DRIVER=mysql
DB_SERVER=127.0.0.1
DB_PORT=8889
DB_DATABASE=sitecms
DB_USER=root
DB_PASSWORD=root
DB_SCHEMA=
DB_TABLE_PREFIX=table_

to
DB_DRIVER=mysql
DB_SERVER=#.###.##.###[server ip]
DB_PORT=8890
DB_DATABASE=thesite_sitecms
DB_USER=thesite_siteuser
DB_PASSWORD=###########
DB_SCHEMA=
DB_TABLE_PREFIX=table_

But I don't know how to change the path or what else I need to do. In index.php I have tried changing
define('CRAFT_BASE_PATH', dirname(__DIR__));

to
define('CRAFT_BASE_PATH', dirname('../../craft'));

but I'm still just getting a white page with no error. I'm pretty sure the subdomain is set up correctly as I have changed the index.php in the staging folder with some text and I can see that text in the url staging.mydomain.com.
I've also changed in general.php
'@baseUrl' => 'http://192.168.1.10:8890/',

to
'@baseUrl' => 'http://staging.mydomain.com:8890/',

What am I missing?
Thanks

**Tags:** subdomain, staging

> **Comments:**
> **username_1**: Why would you want to have a different folder structure on the remote? Seems to be inviting a lot of avoidable pain - just make it standard.  
> **username_0**: Yes I'm struggling could you give me an answer as to how the structure should be for a subdomain?  
> **username_0**: I've recreated my local setup exactly in a subdomain and still getting a blank page.  
> **username_1**: It could be lots of different things - you need to ensure `devMode` is switched on in order to see Craft's error messages, and also check your server error log in case there's a problem prior to reaching Craft.  
> **username_2**: You sure CRAFT_BASE_PATH is set correctly? You can put a die(CRAFT_BASE_PATH) statement directly after constant definition in the index.php. Also check permissions.  

---

## 0 answers

