Prep Drupal Files For Installation

Last modified: 
Sunday, March 29th, 2015

Create Files and Directories and Make Them Writable

This bash one-liner will prepare a Drupal source tree for installation. When run from the Drupal root directory this will:

  • Create the settings.php file.
  • Make the new settings.php file writable to all users.
  • Create a files directory in sites/default/
  • Make the files directory writable to all uses.
cp ./sites/default/default.settings.php ./sites/default/settings.php \ 
&& chmod 777 ./sites/default/settings.php \ 
&& mkdir ./sites/default/files \ 
&& chmod 777 ./sites/default/files

Securing Drupal Files and Directories Post-install

Once the Drupal installer has finished, you will need to secure the permissions properly. For detailed information on securing Drupal file permissions, see Securing file permissions and ownership

The operator of this site makes no claims, promises, or guarantees of the accuracy, completeness, originality, uniqueness, or even general adequacy of the contents herein and expressly disclaims liability for errors and omissions in the contents of this website.