PHPackages                             axyr/silverstripe-modulefolder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. axyr/silverstripe-modulefolder

ActiveSilverstripe-module

axyr/silverstripe-modulefolder
==============================

Install modules in the 'modules' folder instead of root

3532[4 PRs](https://github.com/axyr/silverstripe-modulefolder/pulls)PHP

Since Nov 15Pushed 10y ago2 watchersCompare

[ Source](https://github.com/axyr/silverstripe-modulefolder)[ Packagist](https://packagist.org/packages/axyr/silverstripe-modulefolder)[ RSS](/packages/axyr-silverstripe-modulefolder/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (2)Used By (0)

silverstripe-modulefolder
=========================

[](#silverstripe-modulefolder)

Install modules in the 'modules' folder instead of root.

This is not really a module, but more a proof of concept.

It might break things, but first attempts seem to work just fine.

I tested the silverstripe installer with a few modules and the build passed:

- axyr/silverstripe-adminlogin
- ajshort/silverstripe-gridfieldextensions
- unclecheese/display-logic

Please help me testing this with your own modules ! :)

As far as I can see, the only thing that needs to be changed is an extra check for an extra path in `Requirements::path_for_file`. To test this without touching core there is a `ModuleRequirements_Backend` that also search for requirements in `MODULES_DIR`

```
if(!Director::fileExists($fileOrUrl)) {
  $fileOrUrl = MODULES_DIR . '/' . $fileOrUrl;
}

```

\##Composer

With composer you can set custom installer-paths for silverstripe-module types. To leave the cms and framework folder in the root you can force that as well.

Example:

```
{
	"name": "silverstripe/installer",
	"description": "The SilverStripe Framework Installer",
	"require": {
		"php": ">=5.3.2",
		"silverstripe/cms": "3.1.2",
		"silverstripe/framework": "3.1.2",
		"silverstripe-themes/simple": "*",
		"axyr/silverstripe-modulefolder": "*",
		"axyr/silverstripe-adminlogin": "*"
	},
	"config": {
		"process-timeout": 600
	},
	"minimum-stability": "dev",
	"extra": {
		 "installer-paths": {
			"cms/": ["silverstripe/cms"],
			"framework/": ["silverstripe/framework"],
			"modules/": ["axyr/silverstripe-modulefolder"],
			"modules/{$name}/": ["type:silverstripe-module"]
		}
	}
}

```

This still leads to a code folder near th other modules in the modules folder, but that's something we can't avoid right now.

\##Background

I like to have thirdparty modules living in their own folder and keep my own custom application code in mysite or maybe even a second folder with custom code.

Now that we have composer I install more modules which sometimes provide little functionality but can come in quite handy. I don't want all those small 'plugins' in my root folder.

I don't want to stir up the discussion again if we need this or something is wrong with the current 'all code in root folder' approach

There was a long debate in the Silverstripe 2.x era on the Google dev group:

and

[https://groups.google.com/forum/#!topic/silverstripe-dev/on1\_ABPDNTc](https://groups.google.com/forum/#!topic/silverstripe-dev/on1_ABPDNTc)

For now I just want to know if this is gonna work!

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9fcc5eb430262d4da52fd7a23b2af3cd126402a67a62e08707fd26bd8c3d2c3f?d=identicon)[axyr](/maintainers/axyr)

---

Top Contributors

[![axyr](https://avatars.githubusercontent.com/u/345155?v=4)](https://github.com/axyr "axyr (12 commits)")[![sb-relaxt-at](https://avatars.githubusercontent.com/u/7354968?v=4)](https://github.com/sb-relaxt-at "sb-relaxt-at (1 commits)")

### Embed Badge

![Health badge](/badges/axyr-silverstripe-modulefolder/health.svg)

```
[![Health](https://phpackages.com/badges/axyr-silverstripe-modulefolder/health.svg)](https://phpackages.com/packages/axyr-silverstripe-modulefolder)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
