WordPress Plugin: The Folder Structure
Now look at a standard folder structure for a plugin:
- /unique – plugin – name — (no spaces or special characters)
- unique – plugin – name.php — Primary plugin PHP file
- uninstall.php — The uninstall fi le for your plugin
- /css — Folder for stylesheet files
- /includes — Folder for other PHP includes
- /images — Folder for plugin images
As you can see, keeping your fi les organized using a clean folder structure can make it much easier to track the fl ow of your plugin over time. It can also make it much easier for other plugin developers to follow your logic when they view your plugin ’ s source code.
Brad Williams, Ozh Richard and Justin Tadlock. 2011. Professional WordPress Plugin Development. Indianapolis: Wiley Publishing,inc.