Anda di halaman 1dari 2

Craft s Folder Structure

There s a lot going on in your craft/ folder, so let s makes some sense of it.
Your craft/ folder has the following subfolders:
craft/app/ #
This is where the actual Craft application is stored. You will never need to mak
e any changes within it. (Though if you want to dive into plugin development, it
doesn t hurt to familiarize yourself with it.)
When you need to manually update craft, this is the only folder you will need to
replace.
craft/config/ #
This is where Craft stores your configuration files, including:
db.php Stores your site s database connection settings.
general.php
Stores your site s custom config settings.
license.key Stores your Craft install s license key. This file is automatically ge
nerated for you the first time Craft makes a call to our web server, so don t worr
y if you don t see it right away.
routes.php Stores any PHP-based routes you have.
redactor/
Stores any Redactor configs you want to be available to your Rich Text
fields.
craft/plugins/ #
This is where you should place any plugins you want to install. All plugins mani
fest themselves as a single, self-contained folder that lives here.
craft/storage/ #
This is where Craft stores a bunch of files that get dynamically saved during us
e.
Some of the folders you might find in there include:
backups/ Stores the database backups that get created when you update Craft, or
manually request a backup via the Backup Database tool in Settings.
logo/
Stores the custom logo used for the login page, if you ve uploaded one.
runtime/ Pretty much everything in here is there for caching and logging purpose
s. Nothing that Craft couldn t live without, if the folder happened to get deleted
.
For the curious, here are the types of things you will find in craft/storage/run
time (though this is not a comprehensive list):
assets/ Stores image thumbnails, resized file icons, and copies of images stored
on remote asset sources, to save Craft an HTTP request when it needs the images
to generate new thumbnails or transforms.
cache/ Stores file caches for things like available update info, whether your se
rver is set up to support URLs without index.php , and fetched RSS/Atom feeds.
compiled_templates/
This is where Twig saves your compiled templates as PHP file
s.
logs/ Stores Craft s request logs as well as a PHP error log.
sessions/ Stores PHP s HTTP session data for Craft requests.
userphotos/ Stores your users photos, as well as the resized versions used for th
umbnails.
craft/templates/ #

This is where all of your site s templates go.


craft/translations/ #
This folder is not present by default, but if you create it, you can store custo
m CP and front-end translations in here. The file names and contents should foll
ow the same formats as the files in craft/app/translations/. When a request come
s in that gets served with a locale matching one of your translation s filenames,
the file will automatically get loaded up, and its strings will be used when cal
led upon. (See How can I translate static text in my templates? for an example.)

Anda mungkin juga menyukai