Jump to content

How to organize website files?

Recommended Posts

I've been reading different articles about the way to organize files and folders for websites. Unfortunately I don't seem to fully understand if there's something like the correct or the standard way to do it? All opinions are pretty much in the same path but I've seen they really depend on the complexity of the website, i.e. how large the contents are. Based on what I've read here's how I'm organizing my files

root   img   js   articles		topic1			 article1				   img								   index.html				   ...				   ...			 article2			 article3			 ...			 ...		topic2		topic3		...		...   img   resources	  classes	  libraries	  templates	  ...index.phpcontactus.phperror1.phperror2.php......

I'd like to know if I'm in the right direction?

Link to post
Share on other sites

I think this does not matter at all,you can put all the files in root without any dirs-if you can remember all the names of files. It's all up to you. I like to keep it like:

Root  images      backgrounds      icons      smileys      etc..  source      scripts      css      plugins      etc..   content      pages      etc..index.phpfavicon.icoerror.phpetc..   

Link to post
Share on other sites

There's no correct way to do it, but I do find you've misunderstood something. When you see a URL like this: http://example.com/articles/article-titlewhat's actually going on is that a PHP script is reading the URL and extracting data from it to get information from the database. There is not one file for each article.

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...