/dev/build & flush in SilverStripe
An explanation of dev/build, flush and other related functions in SilverStripe.
When performing functions like upgrading SilverStripe or making changes to templates, there’s a need to ‘refresh’ the CMS in order to view the new changes. This is achieved via URL variables. There are a few different variants, so here’s a list of what each does:
/dev/build/
- Rebuilds the database
- Rebuilds the manifests (statics, classes, templates, YAML)
?flush (or ?flush=1)
- Flushes the current page’s templates
- Regenerates images on the current page
- Rebuilds the manifests (statics, classes, templates, YAML)
Note: The =1 in the URL is not necessary
?flush=all
- Removes all cached templates if the site uses SSViewer.
Forgot to log in?
In order for these URLs to work, one needs to have an active login to the back-end. A common trap for new players is making changes to SilverStripe without being logged-in, then attempting to /dev/build and hitting problems because the site won’t load until it’s built and can’t be built until the user is logged-in.
The workaround is to add &isDev=1 to the URL; for example http://www.mysite.com/dev/build?flush=1&isDev=1
A pop-up prompt will request the username and password for the CMS.
Yet more functionality
SilverStripe have compiled a complete list of URL variable tools on their website.
Comments
No comments have yet been submitted. Be the first!