Results 1 to 8 of 8

Thread: What folder structure do you use?

  1. #1
    Frontpage User
    Join Date
    Sep 2008
    Location
    Ireland
    Posts
    17
    Post Thanks / Like

    Default What folder structure do you use?

    For developers and designers out there, is there any preferred folder structure used for storing images, css files, js files etc?

  2. #2
    Wannabe Geek babyboy808's Avatar
    Join Date
    Jan 2007
    Location
    everywhere
    Posts
    430
    Post Thanks / Like

    Default

    Here's mine:

    Code:
    / root
       / index.php
       / elements/
          / js/    
          / css/
          / lib/      
          / images/
    Last edited by babyboy808; 21-04-2009 at 03:44 AM.

  3. #3
    Frontpage User
    Join Date
    Sep 2008
    Location
    Ireland
    Posts
    17
    Post Thanks / Like

    Default

    Hi Babyboy808,

    Looks good, my own method badly needs an update:

    index.php
    style.css
    javascript.js
    robots.txt
    rss.xml
    sitemap.xml
    / media (all images, pdfs etc used in the content)
    / _images (images for the template only)

  4. #4
    Coder
    Join Date
    Jul 2007
    Location
    Galway
    Posts
    96
    Post Thanks / Like

    Default

    It's usually something like:

    root/
    / index.php
    / scripts (sub-folders if lots of files / libraries being used)
    / styles
    / resources (if anything else is being used...e.g. pdf)
    / images
    Not Work: My blog
    [SIZE=1]Work: Website Design Galway

  5. #5
    Frontpage User
    Join Date
    Sep 2008
    Location
    Ireland
    Posts
    17
    Post Thanks / Like

    Default

    Hi Davkell,

    Looks good. I'd love to see more peoples approaches to this, I was thinking there might be a preferred structure such as those used in free or wordpress templates.

  6. #6
    Coder
    Join Date
    Jul 2007
    Location
    Galway
    Posts
    96
    Post Thanks / Like

    Default

    I'd normally use a structure like that if I'm doing a custom Wordpress theme too - I'd generally keep all that separate to the rest of the php theme files (although if you're distributing the theme for download you can't really set it up like that, but I guess you could use a directory structure like that in the theme folder)
    Not Work: My blog
    [SIZE=1]Work: Website Design Galway

  7. #7
    kjt
    kjt is offline
    Wannabe Geek
    Join Date
    Nov 2006
    Posts
    127
    Post Thanks / Like

    Default

    I generally use

    root/
    / index.php
    / css
    / imgs
    / js
    / files (anything downloadable)

    Also if the site is less then 10/20 pages I'd put each within their own folder like:

    / Clients / index.php
    / Contact / index.php
    / About / index.php


  8. #8
    Wannabe Geek php.allstar's Avatar
    Join Date
    Apr 2009
    Location
    Monamolin, Gorey, Co. Wexford
    Posts
    405
    Post Thanks / Like

    Default

    I use seperate subdomains for images, css and javascript/jquery

    css.domain.com
    images.domain.com
    js.domain.com

    Altough this results in 4 DNS lookups, this is within the acceptible range of 2 - 4 (the lower this number the better). This results in more parallel downloads, helping your pages load quicker.

    As I work on Linux, I place sensitive php scripts in a directory below the root when creating my own applications, and I know most turnkey applications such as Wordpress, osCommerce etc, don't have this setup, but hey, thats how I go.

Similar Threads

  1. New Forum URL Structure and SEO
    By paintballer.ie in forum Search Engine Optimisation
    Replies: 8
    Last Post: 05-01-2009, 02:16 PM
  2. URL SEO Structure
    By Amateur in forum Search Engine Optimisation
    Replies: 9
    Last Post: 18-08-2008, 06:18 PM
  3. Finding out Site Structure
    By ziycon in forum Webmaster Discussion
    Replies: 2
    Last Post: 23-05-2008, 03:43 PM
  4. Site Structure
    By ziycon in forum Coding Help
    Replies: 10
    Last Post: 14-02-2008, 03:43 PM
  5. PHP Folder Handling
    By ziycon in forum Coding Help
    Replies: 3
    Last Post: 18-01-2007, 05:31 PM

Visitors found this page by searching for:

Why use a folder structure

reason for using a folder structure

one reason for using a folder structure

reasons for using a folder structure

why use folder structure

website folder organization

reason for using a folder structure.

folder organization reason for using a folder structurephp folder organizationwhy should you use a folder structure reason for using a folder structure.why would you use a folder structurereason for using folder structurewhy to use a folder structureFOLDER ORGANIZATION USESreasons for using folder structureseo folder structurewhy would you use a folder structure?website folder structureone reason for using a folder structure.Why do we use folder structure what are folder structures used forweb design folder structurewhy do you use a folder structure

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •