Users who download Drupal routinely add new modules directly to the /modules or themes to the /themes directory. The correct location of "sites/all/modules" is not at all clear and the number of files and directories in the Drupal core download makes it an exploratory effort to find the correct location. This issue's goal is to simplify the Drupal root directory.
This issue has been going on for 6 years, please take into consideration the compromise that has already taken place. The scope of this issue is clear. These exact things have been agreed upon as what we're handling in this issue:
- Move all directories other than "sites" and "profiles" into a "core" directory.
- Move all files other than .gitignore, .htaccess, index.php, README.txt, robots.txt, and web.config into the "core" directory also.
- Adjust code and documentation throughout core to reflect the new locations.
These things specifically are not covered by this issue:
- Moving the "profiles" directory to "core/profiles".
- Moving "sites/all/*" to the root directory.
- Any other changes to the "sites" directory, such as removing "sites/default" or relocating settings.php.
- The addition of a "docs" directory.
See comment #121 for information about the "profiles" directory and other omitted changes.
This issue was RTBC at one point but now is postponed to let all the bugs get worked out of D7/D8. This issue is on hold until November 1, 2011 per Dries' comment in #254. In late October, this patch needs a reroll to prepare it for commit.
User interface changes
None, other than the directory structure changing.
A side-effect is documented in #124, where paths such as "profiles/sites/all/modules" or "modules/sites/all/modules" are no longer parsed. The addition of the "core/" prefix brought this issue to light, it could be considered a minor bug-fix.
Original report by kbahey
Currently, themes, modules and configuration files are all under separate directories in the directory where Drupal is installed (root directory). Also, several files exist in that directory, such as various .txt files.
This causes several issues:
1. Clutter in the root directory.
2. Base Drupal is intermixed with files that site admins install (e.g. themes, theme engines, modules, directory for images, sites directory, ....etc.).
3. Upgrades are problematic because of that intermixing.
Here is a summary of what was discussed so far:
Ideally, core Drupal will be in one directory called drupal under the root directory, with only the index.php and .htaccess at the same level.
Another directory called custom will hold the configuration directory, the site admin installed modules, and site admin installed themes.
So, the end result would be:
public_html (root directory)
All the above would be included in the Drupal tarball, and should never need to be changed by a site admin in a normal install. The settings.php provided will contain localhost.
The following directory will be included in the tarball, with an empty structure (directories, and no files).
Users then start by copying the drupal/sites/default/settings.php to:
Drupal core will search the custom/sites directory first for configuration files, then if it cannot find any, it will go to the drupal/sites/default/settings.php. We should discourage (or better: prevent) adding any directories under drupal/sites other than the default directory.
Site admins then add their public/html/custom/sites/hostname/settings.php as needed, and can even add site specific themes and modules under each site directory as they do today.
Upgrades then consist of simply copying a new drupal directory to replace the existing one (and for backup, people can rename the old one to drupal-4.6 in case they want to go back), and copying the new index.php over the old one. They can then upgrade their own modules in separate directories.
The user's content (images, movies, flat files of any kind) is not affected in an upgrade, and the site admins are advised not to change the 'drupal' directory in any way.
The .txt files can be moved into doc directory under the drupal directory.
PASSED: [[SimpleTest]]: [MySQL] 33,771 pass(es).
FAILED: [[SimpleTest]]: [MySQL] 33,759 pass(es), 1 fail(s), and 0 exception(es).
PASSED: [[SimpleTest]]: [MySQL] 33,762 pass(es).
PASSED: [[SimpleTest]]: [MySQL] 33,759 pass(es).
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal.core_move_22336_288.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.