Directory Structure
Zero-config setup
Out of the box, Acorn will use its own configs, and it will keep the application cache and logs in the standard WordPress cache directory:
Traditional setup
Acorn also supports a more traditional Laravel-esque structure. We recommend this approach if you are adding Acorn/Laravel packages and want to have more control over your app.
If you've installed Acorn from your Bedrock project root, Acorn's config/
directory will conflict with Bedrock's. We recommend using Radicle to avoid this.
There are no conflicts with the config/
directory if you've installed Acorn from your theme.
You can manually create a config/
directory, or you can automatically set up the traditional structure with WP-CLI (see below).
If you have a config/
directory, you can drop your desired config files in there. any that are missing (such as app.php
) will just be pulled from Acorn's config directory.
WP-CLI commands for setting up the traditional structure
You can automatically set up the traditional structure via WP-CLI:
Alternatively, you can choose to only copy the config files.
Advanced directory modifications
You can modify the path for any Acorn directory by using the acorn/paths.{$path}
filters, where $path
is one of the following:
-
base
-
app
-
config
-
storage
-
resources
-
public
The base path may also be set by defining the ACORN_BASEPATH
constant. This is useful for setting it when filters are unavailable, such as in wp-config.php.
Contributors
Last updated
Support Roots
Help us continue to build and maintain our open source projects. We’re a small team of independent developers and every little bit helps.
Sponsor Roots on GitHub