Body: <p>Civi used to work under <a href="https://localwp.com/" rel="nofollow noreferrer">Local</a> (née Local by Flywheel) on Windows, but I can't get it to install under the latest version. The Civi installer can't parse the schema xml files due to a path error. What happens is:</p>
  <ol>
  <li>CRM_Core_CodeGen_Util_Xml::parse() tries to process the main schema file in civicrm/civicrm/xml/schema/Schema.xml</li>
  <li>It loads this file fine, but then runs xinclude() to pull in all the .xml files linked to in schema.xml</li>
  <li>It can't find them. It's not looking in the correct place: I can see in Process Monitor that it's looking in the root folder, rather than wp-content/plugins/civicrm/civicrm/xml/schema. xinclude then throws a &quot;failed to load external entity&quot; error.</li>
  </ol>
  <p>I've tried:</p>
  <ul>
  <li>checking that the DomDocument URI is correct - it seems to be fine</li>
  <li>setting the PHP working directory manually. This helps xinclude() find the files, but it then throws a &quot;trying to build relative URI&quot; error.</li>
  </ul>
  <p>I assume it's something different in the Local environment. I've tried 2 different machines. Any ideas what could affect this? It doesn't help that Local has an ungoogleable name.</p>
  <p>Latest version of Civi, latest version of WordPress. Local version 5.9.8+5191. libxml 2.9.9.</p>
  <p>Andrew</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-09T19:15:21.887Z
Comments.Text: I ran into a similar xinclude issue about a year ago on windows (for drupal but I think the windows part is the relevant part). Let me see if I can find that.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-09T19:26:00.970Z
Comments.Text: It was here: https://github.com/civicrm/civicrm-core/commit/6fa5ec527d6f41fe16552a39d164acdd4d56c49d. What method are you using for install? UI / cv / wp-something?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-10T11:45:59.840Z
Comments.Text: Thanks! I thought I had a good look at the slashes, but maybe I've missed something. Will take another pass. Install-wise, I just unzipped into the plugins folder like it's the 90s.
Comments.UserDisplayName: Andrew West
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-10T16:57:43.297Z
Comments.Text: Hrm. I discovered you can "fix" it by setting the DomDocument->documentURI parameter to a __relative path to the file__, instead of the absolute path it uses by default. In a standard WP setup this is '../wp-content/plugins/civicrm/civicrm/xml/schema/Schema.xml'.
  
  I thought the underlying problem was spaces in the path, but I've just recreated the error without that - so it must be something else in the underlying Local setup. Yeesh.
Comments.UserDisplayName: Andrew West
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-11T10:55:17.813Z
Comments.Text: Hit a wall, but logged this as an issue at: https://lab.civicrm.org/dev/wordpress/-/issues/89
Comments.UserDisplayName: Andrew West
Tags: <wordpress><installation><local>
Title: Installing Civi onto WordPress under Local does not work due to XML path errors
ThreadText: # Installing Civi onto WordPress under Local does not work due to XML path errors
  
  (Asked by: username_0 on 2021-02-09)
  
  Civi used to work under [Local](https://localwp.com/) (née Local by Flywheel) on Windows, but I can't get it to install under the latest version. The Civi installer can't parse the schema xml files due to a path error. What happens is:
  
  1. CRM\_Core\_CodeGen\_Util\_Xml::parse() tries to process the main schema file in civicrm/civicrm/xml/schema/Schema.xml
  2. It loads this file fine, but then runs xinclude() to pull in all the .xml files linked to in schema.xml
  3. It can't find them. It's not looking in the correct place: I can see in Process Monitor that it's looking in the root folder, rather than wp-content/plugins/civicrm/civicrm/xml/schema. xinclude then throws a "failed to load external entity" error.
  
  I've tried:
  
  * checking that the DomDocument URI is correct - it seems to be fine
  * setting the PHP working directory manually. This helps xinclude() find the files, but it then throws a "trying to build relative URI" error.
  
  I assume it's something different in the Local environment. I've tried 2 different machines. Any ideas what could affect this? It doesn't help that Local has an ungoogleable name.
  
  Latest version of Civi, latest version of WordPress. Local version 5.9.8+5191. libxml 2.9.9.
  
  username_0
  
  **Tags:** wordpress, installation, local
  
  > **Comments:**
  > **username_1**: I ran into a similar xinclude issue about a year ago on windows (for drupal but I think the windows part is the relevant part). Let me see if I can find that.  
  > **username_1**: It was here: https://github.com/civicrm/civicrm-core/commit/6fa5ec527d6f41fe16552a39d164acdd4d56c49d. What method are you using for install? UI / cv / wp-something?  
  > **username_0**: Thanks! I thought I had a good look at the slashes, but maybe I've missed something. Will take another pass. Install-wise, I just unzipped into the plugins folder like it's the 90s.  
  > **username_0**: Hrm. I discovered you can "fix" it by setting the DomDocument->documentURI parameter to a __relative path to the file__, instead of the absolute path it uses by default. In a standard WP setup this is '../wp-content/plugins/civicrm/civicrm/xml/schema/Schema.xml'.  I thought the underlying problem was spaces in the path, but I've just recreated the error without that - so it must be something else in the underlying Local setup. Yeesh.  
  > **username_0**: Hit a wall, but logged this as an issue at: https://lab.civicrm.org/dev/wordpress/-/issues/89  
  
  ---
  
  ## 0 answers
  
  