I'm pulling down a repository of a D8 multisite install and running it locally.

The sites are set web/sites/default and web/sites/mysite. In the root of sites there is a sites.php which contains

$sites['mydomain.com'] = 'mysite';

In the web/sites/mysite directory there is a settings.php which has

$settings['file_public_path'] = 'sites/mysite/files';

however when I visit the local site in my browser I can see that files are being served from e.g. /sites/default/files/2019-01/header-mysite.png (I've added the files directory in both sites/default and sites/mysite).

The odd thing is that when I visit the site that is actually available on the web (which I am told is running from the same repo / branch as I have locally, the files are being loaded from e.g. /sites/mysite/files/2019-01/header-mysite.png

Can anyone advise how I should try to address this? I tried adding my local url to sites.php but it didn't seem to change anything.

  • What do your File system settings say? /admin/config/media/file-system – prkos Feb 20 '19 at 16:19
  • thanks @prkos. In web/sites/mysite there are: default.settings.php settings.php default.local.settings.php each of which has settings['file_public_path'] = 'sites/mysite/files'; but it doesn't seem to affect where the image is pulled from or the location that is shown in the Drupal Admin UI at admin/config/media/file-system – Stuart Brown Feb 20 '19 at 21:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.