An example style guide for WordPress files and folders

Get Organized

There are so many ways to organize files and folders in WordPress, and it can get confusing if there is no agreement among your development team on where you put certain files. I’ve written an example style guide that I developed to better organize files and folders in WordPress sites for my team.

Media Files

  • Add any media files such as images, audio, movies, and documents in /media/
  • Create subfolders for each file types within /media/ if there are many files
  • Combine commonly used images such as social media icons and use CSS Sprites to reduce loading time

Child Theme

  • Create a Child Theme for any theme you select to keep parent theme untouched
  • Add any images that over-rides parent theme image in /wp-content/themes/child-theme/img/
  • Add any page or function specific stylesheet files in /wp-content/themes/child-theme/css/
  • Add any additional JavaScript files in /wp-content/themes/child-theme/js/
    • Include common files such as jQuery via functions.php for a faster load time
  • Add functions.php file to add your custom functions and avoid copying unnecessary files from parent theme to Child Theme to add small functions