Moving the Sites/Default/Files Directory We have a client with simple request to move the Public File folder up simply so that links will be shorter like example.com/files/ instead of example.com/sites/default/files/.

I assumed this would just entail running 

mv ./sites/default/files/ ./files/

in the root directory where my index.php resides and then changing the line in settings.php. Yet, this does not work, and I can't figure out why. In the file_managed table the uri column looks like public://example.png. Does that variable 'public' not resolve to the default public path?

Here's what my settings.php line reads:

# Change Public File directory
$settings['file_public_path'] = 'files';


The folder is right next to my index.php file and the entire folder, including contents is set to 775, or rwxrwxr-x.

drwxrwxr-x. 47 apache webgrp  28672 Nov 15 10:14 files
-rwxrwxr-x.  1 apache webgrp    648 Oct 25 08:17 index.php


Weirder, in the browser inspector, it appears that Drupal is looking for files at /files/example.png and there is definately a matching file at /files/. What am I missing? The only docs I can find are for Drupal 7, and all modules I've seen are only for 7 as well.
Look in Admin > Config > Media > File System:

/admin/config/media/file-system


  Public file system path
  sites/default/files
  A local file system path where public files will be stored. This directory must exist and be writable by Drupal. This directory must be relative to the Drupal installation directory and be accessible over the web. This must be changed in settings.php


So there you have it. If you want to change the file system path for the public:// stream wrapper, you will need to edit settings.php.

EDIT: I'm not sure what else is at play here. If you still can't get this working to your client's specifications, you may be able to spoof it with a symbolic link in the file system:

ln -s files sites/default/files


The files would still be hosted in the wrong location, so this is actually no solution. Hopefully somebody else can point you in the right direction. Good luck!