Version 2 (modified by Jamie McClelland, 13 years ago) (diff)


How can I upload a file to my themes or modules directory? When I try I get an access denied message

If your Drupal installation was installed by May First/People Link, then you are using a central, shared version of the Drupal code (which means that when we update the code to fix security holes, your version is automatically updated too).

One of the side effects of this setup is that you cannot modify files in many of your web root's directories (most noticeably your themes or modules directories). When you try, you will get an Access denied message.

This restriction prevents you from editing the core Drupal code (if you could edit these files, your changes might be over-written with the next Drupal update).

Drupal has a system that allows you to make your own modification to your themes and modules directories without interfering with this core Drupal code. In your web directory, along with themes, modules, and others, there is a directory called sites. This directory is where you should put all of your customizations. The sites directory has a sub-directory called default. You can create a modules and themes directory here. Any module or theme you place in this directory will appear in your modules and themes admin pages just as if it was placed in your main modules or themes directory.

When customizing your own theme, a common approach is to:

  • Copy a theme from the central theme directory
  • Rename it after your site (so it doesn't conflict with the original them
  • Place it in your sites/default/themes directory
  • Switch your site to use your new theme
  • Customize the theme to your liking

Attachments (3)

Download all attachments as: .zip