I want to create an install profile that creates the files folder in the document root, www.example.com/files, and not the sites/default folder.
I have tried two methods of doing this and both partially works, they create the folder in the correct place, but when the site is finished installing the admin/config/media/file-system is showing "sites/default/files".
Method 1 used:
Added "$conf['file_public_path'] = "files";" to settings.php
Note: This line was actually removed from settings.php after installation finished
Method 2:
added the below code to [myprofile].profile:
function sitebase_install_tasks_alter(&$tasks, &$install_state) {
$GLOBALS['conf']['file_public_path'] = 'files';
}
In both cases the Verify requirements step was testing for "files".
How come Drupal all of a sudden seems to lose this setting and instead inserting the wrong value in the db? Do I need to also manually insert this in the db in [myprofile].install?