Answers.Body: <p>The issue is that the file structure you are using is not accounted for in the installer.</p>
  
  <p>We've covered the standard directory structures and detect them, however there are some use cases that we have not been able to both detect and set programmatically.  In these cases, you will need to override the values.  </p>
  
  <p>In your case you needed to override the URLs as the <code>[civicrm.files]</code> URL is appending <code>/home/myorganization/www/sites/staging/crm.myorganization.org</code> to the URL.   </p>
  
  <p>I have seen this before (mostly with symlinks or if both WP is installed in it's own directory AND wp-content has been moved).   Can you let us know who your host is and confirm your configuration? </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-02T21:19:32.907Z
Answers.Text: Hi Kevin. I've edited the original post providing details on the installed folder structure. This is a self-installed structure intended to support side-by-side production, staging, and test installs. It's hosted by A2 Hosting.
Answers.UserDisplayName: Martin_W
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-02T13:54:17.073Z
Answers.LastActivityDate: 2018-03-02T13:54:17.073Z
Answers.UserDisplayName: Kevin Cristiano
Answers.Body: <p>This happened to me and is a common issue - especially on shared hosts. Solution is to add the correct information in your civicrm.settings.php file.</p>
  
  <p>Try placing the following in the overrides section of your civicrm.settings.php file. </p>
  
  <pre><code>global $civicrm_paths;
  $civicrm_paths['civicrm.files'] = array(
    'url' =&gt; 'https://crm.staging.myorganization.org/wp-content/uploads/civicrm/',
    'path' =&gt; '/home/myorganization/www/sites/staging/crm.myorganization.org/wp-content/uploads/civicrm',
  );
  </code></pre>
  
  <p>More info can be <a href="https://civicrm.stackexchange.com/questions/19495/set-civicrm-files/19498#19498">found in this answer.</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-07T20:05:01.697Z
Answers.LastActivityDate: 2018-03-07T20:10:01.787Z
Answers.LastEditDate: 2018-03-07T20:10:01.787Z
Answers.UserDisplayName: themak
Body: <p>I'm puzzled why, for a fresh CiviCRM install on WordPress, the URL variable <strong>[civicrm.files]</strong> is set incorrectly, resulting in some out-of-the-box broken behavior. Specifically:</p>
  
  <p>I "successfully" installed CiviCRM v.4.7.30 on WordPress v.4.9.4. I got some pop-up warnings and jumped to the "System Status" screen, which was blank except for <code>System Status: Error</code> in the footer.</p>
  
  <p>When I "inspected" the web page, I found "404 file not found errors" for some angular-modules... files, for example <a href="https://crm.staging.myorganization.org/home/myorganization/sites/staging/crm.myorganization.org/wp-content/uploads/civicrm/persist/contribute/dyn/angular-modules.e0e4119919ee72acc13134f3f09d77c0.js" rel="nofollow noreferrer">https://crm.staging.myorganization.org/home/myorganization/sites/staging/crm.myorganization.org/wp-content/uploads/civicrm/persist/contribute/dyn/angular-modules.e0e4119919ee72acc13134f3f09d77c0.js</a> was  not found.</p>
  
  <p>After some digging, the tip to go to <em>Administer -> System Settings -> Debugging</em> and disabling the "Asset Cache" (from <a href="https://civicrm.stackexchange.com/a/19597/5790">https://civicrm.stackexchange.com/a/19597/5790</a>) made the "System Status" screen work. Yay! But that's not a good production solution.</p>
  
  <p>Digging further, I found that <strong>URL variables</strong> were set to the following. The <strong>[civicrm.files]</strong> value is <strong>incorrect</strong>.</p>
  
  <blockquote>
    <p><strong>URL Variables</strong><br>
    <strong>[cms.root]</strong> <a href="https://crm.staging.myorganization.org/" rel="nofollow noreferrer">https://crm.staging.myorganization.org/</a><br>
    <strong>[civicrm.root]</strong> <a href="https://crm.staging.myorganization.org/wp-content/plugins/civicrm/civicrm/" rel="nofollow noreferrer">https://crm.staging.myorganization.org/wp-content/plugins/civicrm/civicrm/</a> 
    <strong>[civicrm.files]</strong> <a href="https://crm.staging.myorganization.org/home/myorganization/www/sites/staging/crm.myorganization.org/wp-content/uploads/civicrm/" rel="nofollow noreferrer">https://crm.staging.myorganization.org/home/myorganization/www/sites/staging/crm.myorganization.org/wp-content/uploads/civicrm/</a></p>
  </blockquote>
  
  <p>However all of the <strong>Path variables</strong> were <strong>correct</strong>:</p>
  
  <blockquote>
    <p><strong>Path Variables</strong><br>
    <strong>[cms.root]</strong> /home/myorganization/www/public_html/sites/staging/crm.myorganization.org<br>
    <strong>[civicrm.root]</strong> /home/myorganization/www/sites/staging/crm.myorganization.org/wp-content/plugins/civicrm/civicrm<br>
    <strong>[civicrm.files]</strong> /home/myorganization/www/sites/staging/crm.myorganization.org/wp-content/uploads/civicrm</p>
  </blockquote>
  
  <p>On the <em>Administer -> System Settings -> Resource URLs</em>, the default values include the following:</p>
  
  <blockquote>
    <p><strong>Image Upload URL</strong> [civicrm.files]/persist/contribute/<br>
    <strong>Extension Resource URL</strong>  [civicrm.files]/ext/</p>
  </blockquote>
  
  <p>It is the use of the invalid <strong>[civicrm.files]</strong> value here that resulted in the blank "System Status" screen. Once I changed these to the correct absolute URL, the "System Status" screen worked fine, even after I changed <em>Administer -> System Settings -> Debugging -> Asset Cache</em> back to the default "<strong>auto</strong>" setting.</p>
  
  <p>Why is <strong>[civicrm.files]</strong> set to this odd incorrect value, when <strong>[civicrm.root]</strong> is perfectly fine? This is confusing for a CiviCRM newcomer (such as myself). Of all things, the "System Status" screen should be able to report the issues for the fresh install.</p>
  
  <hr>
  
  <p>To clarify the installed folder structure:</p>
  
  <p>The <code>$_SERVER['DOCUMENT_ROOT']</code> is <code>/home/myorganization/www/public_html</code>, but I've created a folder structure under <code>/home/myorganization/www/sites</code> for test, staging, and production folders for various sites. The <code>~/www/sites folder</code> is symlinked into <code>/home/myorganization/www/public_html</code>. I've created a custom <code>__index.php__</code> file that gives the values of various PHP variables:</p>
  
  <blockquote>
    <p>Full URL= <a href="https://crm.staging.myorganization.org/__index__.php" rel="nofollow noreferrer">https://crm.staging.myorganization.org/<strong>index</strong>.php</a><br>
    <strong>$_SERVER['DOCUMENT_ROOT']</strong>= /home/myorganization/www/public_html
    <strong>$_SERVER['PHP_SELF']</strong>= /sites/staging/crm.myorganization.org/<strong>index</strong>.php<br>
    <strong>$_SERVER['SCRIPT_NAME']</strong>=   /sites/staging/crm.myorganization.org/<strong>index</strong>.php<br>
    <strong>$_SERVER['SCRIPT_FILENAME']</strong>=   /home/myorganization/www/public_html/sites/staging/crm.myorganization.org/<strong>index</strong>.php<br>
    <strong>realpath( $_SERVER['SCRIPT_FILENAME'])</strong>=    /home/myorganization/www/sites/staging/crm.myorganization.org/<strong>index</strong>.php<br>
    <strong>getcwd()</strong>=  /home/myorganization/www/sites/staging/crm.myorganization.org<br>
    <strong>__FILE__</strong>=  /home/myorganization/www/sites/staging/crm.myorganization.org/<strong>index</strong>.php  </p>
  </blockquote>
  
  <h2>Bonus Question</h2>
  
  <p>After fixing the above, the "System Status" screen still complains "<strong>Incorrect Resource URL:</strong> The Resource URL is not set correctly. Please set the CiviCRM Resource URL." Why?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-02T22:10:45.177Z
Comments.Text: For the Bonus Question:   That is a false positive.   This issue added the check https://issues.civicrm.org/jira/browse/CRM-21262   we need to determine why the check fails on WP.   It should work.  But obviously it does not.
Comments.UserDisplayName: Kevin Cristiano
Tags: <wordpress><install><status>
Title: Blank System Status screen and invalid [civicrm.files] URL variable on fresh CiviCRM v.4.7.30 and WordPress v.4.9.4 install
ThreadText: # Blank System Status screen and invalid [civicrm.files] URL variable on fresh CiviCRM v.4.7.30 and WordPress v.4.9.4 install
  
  (Asked by: username_0 on 2018-03-01)
  
  I'm puzzled why, for a fresh CiviCRM install on WordPress, the URL variable **[civicrm.files]** is set incorrectly, resulting in some out-of-the-box broken behavior. Specifically:
  
  I "successfully" installed CiviCRM v.4.7.30 on WordPress v.4.9.4. I got some pop-up warnings and jumped to the "System Status" screen, which was blank except for `System Status: Error` in the footer.
  
  When I "inspected" the web page, I found "404 file not found errors" for some angular-modules... files, for example <https://crm.staging.myorganization.org/home/myorganization/sites/staging/crm.myorganization.org/wp-content/uploads/civicrm/persist/contribute/dyn/angular-modules.e0e4119919ee72acc13134f3f09d77c0.js> was not found.
  
  After some digging, the tip to go to *Administer -> System Settings -> Debugging* and disabling the "Asset Cache" (from <https://civicrm.stackexchange.com/a/19597/5790>) made the "System Status" screen work. Yay! But that's not a good production solution.
  
  Digging further, I found that **URL variables** were set to the following. The **[civicrm.files]** value is **incorrect**.
  
  > **URL Variables**  
  > **[cms.root]** <https://crm.staging.myorganization.org/>  
  > **[civicrm.root]** <https://crm.staging.myorganization.org/wp-content/plugins/civicrm/civicrm/>
  > **[civicrm.files]** <https://crm.staging.myorganization.org/home/myorganization/www/sites/staging/crm.myorganization.org/wp-content/uploads/civicrm/>
  
  However all of the **Path variables** were **correct**:
  
  > **Path Variables**  
  > **[cms.root]** /home/myorganization/www/public\_html/sites/staging/crm.myorganization.org  
  > **[civicrm.root]** /home/myorganization/www/sites/staging/crm.myorganization.org/wp-content/plugins/civicrm/civicrm  
  > **[civicrm.files]** /home/myorganization/www/sites/staging/crm.myorganization.org/wp-content/uploads/civicrm
  
  On the *Administer -> System Settings -> Resource URLs*, the default values include the following:
  
  > **Image Upload URL** [civicrm.files]/persist/contribute/  
  > **Extension Resource URL** [civicrm.files]/ext/
  
  It is the use of the invalid **[civicrm.files]** value here that resulted in the blank "System Status" screen. Once I changed these to the correct absolute URL, the "System Status" screen worked fine, even after I changed *Administer -> System Settings -> Debugging -> Asset Cache* back to the default "**auto**" setting.
  
  Why is **[civicrm.files]** set to this odd incorrect value, when **[civicrm.root]** is perfectly fine? This is confusing for a CiviCRM newcomer (such as myself). Of all things, the "System Status" screen should be able to report the issues for the fresh install.
  
  ---
  
  To clarify the installed folder structure:
  
  The `$_SERVER['DOCUMENT_ROOT']` is `/home/myorganization/www/public_html`, but I've created a folder structure under `/home/myorganization/www/sites` for test, staging, and production folders for various sites. The `~/www/sites folder` is symlinked into `/home/myorganization/www/public_html`. I've created a custom `__index.php__` file that gives the values of various PHP variables:
  
  > Full URL= [https://crm.staging.myorganization.org/**index**.php](https://crm.staging.myorganization.org/__index__.php)  
  > **$\_SERVER['DOCUMENT\_ROOT']**= /home/myorganization/www/public\_html
  > **$\_SERVER['PHP\_SELF']**= /sites/staging/crm.myorganization.org/**index**.php  
  > **$\_SERVER['SCRIPT\_NAME']**= /sites/staging/crm.myorganization.org/**index**.php  
  > **$\_SERVER['SCRIPT\_FILENAME']**= /home/myorganization/www/public\_html/sites/staging/crm.myorganization.org/**index**.php  
  > **realpath( $\_SERVER['SCRIPT\_FILENAME'])**= /home/myorganization/www/sites/staging/crm.myorganization.org/**index**.php  
  > **getcwd()**= /home/myorganization/www/sites/staging/crm.myorganization.org  
  > **\_\_FILE\_\_**= /home/myorganization/www/sites/staging/crm.myorganization.org/**index**.php
  
  ## Bonus Question
  
  After fixing the above, the "System Status" screen still complains "**Incorrect Resource URL:** The Resource URL is not set correctly. Please set the CiviCRM Resource URL." Why?
  
  **Tags:** wordpress, install, status
  
  > **Comments:**
  > **username_1**: For the Bonus Question:   That is a false positive.   This issue added the check https://issues.civicrm.org/jira/browse/CRM-21262   we need to determine why the check fails on WP.   It should work.  But obviously it does not.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-03-02. Score: 0 | Accepted answer
  
  The issue is that the file structure you are using is not accounted for in the installer.
  
  We've covered the standard directory structures and detect them, however there are some use cases that we have not been able to both detect and set programmatically. In these cases, you will need to override the values.
  
  In your case you needed to override the URLs as the `[civicrm.files]` URL is appending `/home/myorganization/www/sites/staging/crm.myorganization.org` to the URL.
  
  I have seen this before (mostly with symlinks or if both WP is installed in it's own directory AND wp-content has been moved). Can you let us know who your host is and confirm your configuration?
  
  > **Comments:**
  > **username_0**: Hi username_1. I've edited the original post providing details on the installed folder structure. This is a self-installed structure intended to support side-by-side production, staging, and test installs. It's hosted by A2 Hosting.  
  
  ---
  
  ### Answer by username_2 on 2018-03-07. Score: 0
  
  This happened to me and is a common issue - especially on shared hosts. Solution is to add the correct information in your civicrm.settings.php file.
  
  Try placing the following in the overrides section of your civicrm.settings.php file.
  
  ```
  global $civicrm_paths;
  $civicrm_paths['civicrm.files'] = array(
    'url' => 'https://crm.staging.myorganization.org/wp-content/uploads/civicrm/',
    'path' => '/home/myorganization/www/sites/staging/crm.myorganization.org/wp-content/uploads/civicrm',
  );
  
  ```
  
  More info can be [found in this answer.](https://civicrm.stackexchange.com/questions/19495/set-civicrm-files/19498#19498)
  
  
  ---
  
  