Downloads
Everything Grav
Download Grav
Grav Core is the base package with core functionality and a few essential starting pages. Grav Core + Admin also includes the Administration Panel plugin. Both are easy to get started with — check out our Basic Tutorial and Guide to the Administration Panel.
Latest stable release
Production-ready. The version we recommend for every new site and every upgrade of an existing one.
Get Started
1
Quick installation
- Download either the Grav Core or Grav Core + Admin2 plugin installation package.
- Extract the zip file into your webroot.
- Point your browser at your local webserver:
http://yoursite.com
2
How to install the Admin2 plugin
If you have not already installed the admin plugin, you can do so easily with GPM:
$
This will install the admin plugin plus its dependencies (api & login). After this is complete, point your browser to your Grav installation and you will be prompted to create a new admin user.
Changelog
v2.2.35
Latest
3 days ago
-
- [security] The security fixes below were found by Anthropic's OSS Scanner
- [security] Page and taxonomy setters called from Twig in page content keep only plain data, and the session options in system configuration can't be read from page content
- [security] Page content can only change the page being rendered: setter methods called with arguments on any other page are refused
- [security] Saving a Flex group or account no longer drops a permission that overrides the one above it, such as a denied backup under allowed system access
- [security] The Twig
constanttest follows the content sandbox's function allowlist, a collection'ssort_flagsonly accepts sort flag names, andmedia_directory()only opens local media folders - [security] The asset pipeline and inline asset loader only read stylesheets and scripts inside the Grav folder, and asset lists that can't be encoded get a bundle of their own
- [security] Folders named like configuration files are no longer loaded as configuration (run
bin/grav clearonce after updating) - [security] The detailed error page no longer shows environment variable values or stack trace arguments
- [security] New sites show the simple error page by default, and
errors.displaycan be turned on inuser/config/system.yamlwhen the detailed page is needed - [security]
vardump()always prints its output as escaped plain text - [security] The debugger always hides protected configuration, its own token and login details, whatever
censoredis set to - [security] Absolute links in page content always use the site's own address and port, including a full custom base URL
- [security] A request that still carries a session id replaced at login gets a new empty session instead of the signed-in one
- [security] The built-in PHP server router applies its access rules when Grav runs from a subfolder with
GRAV_BASEDIR - [security] A Flex page's template only picks a blueprint when it names a registered page type, and only
.yamlfiles are trusted as blueprints - [security] Pending form uploads are stored in a folder named after a hash of the session id, so uploads pending during the update have to be added again
- [security] The
languagepage header is only used when it is a plain language code - [security] Saving an account through a form keeps only the avatar files the account already has
- [security] Passwords that haven't been hashed yet are no longer returned with account data
- [security] Creating a group that grants super admin needs a super admin, managing super admin accounts and groups through Flex forms needs super admin granted by name, and super admin groups in any environment's
groups.yamlcount for that protection - [security] A session is signed out when its account was re-created under the same username, and passkeys removed from an account are removed from its open sessions
- [security] Saving one group no longer undoes changes others made to the groups file at the same time, and refreshing a Flex object picks up access changes stored since it was loaded
- [security] Saving a Flex object clears its cached copy for every host name, and accounts with digit-only usernames are found again with folder storage
- [security] Creating, updating or checking a Flex object can no longer replace another object, take a storage key from submitted data or skip the permission check when no user is passed
- [security] Saving a page through a front-end Flex pages form no longer replaces another page when its source page was deleted or moved, and an empty template no longer renames the page file
- [security] Front-end Flex pages forms always check create permission on the parent page, and page rules apply to groups with digit-only names and never to a disabled account or an unfinished login
- [security] With Flex pages enabled, each page keeps the language of its own file, pages in suffixed default-language files pass their permissions to their children, and deleting a folder with sub-folders the page index can't list is refused
- [security] A page's
routesaliases, default or canonical route only claim URLs that no other page already has by its folder or slug - [security] Uploaded file names with
.varamong their extensions are refused, and the shipped.htaccessturns off Apache's type-map handler (added to existing sites on update) - [security] An uploaded SVG is sanitized even when saving its metadata file fails
- [security] Images that wouldn't fit in PHP's memory limit, JPEGs with more than 100 scans and oversized
zoomCropcanvases are served as the original, and fixing an image's orientation reads only its Exif orientation - [security] Checking form input for XSS takes time in line with the input's size and stops at the first flagged value
- [security] Footnote labels and abbreviation meanings in Markdown Extra are escaped, and a page whose frontmatter can't be read shows the invalid frontmatter page instead of being served as content
- Flex pages protect Twig tags from Markdown with the same placeholders regular pages use, and removing a
markdown="1"attribute no longer joins the text around it - The invalid frontmatter page shows the parser's message as plain text
- A module renders its template in the format of the page that embeds it, and a format that isn't a plain extension (such as
amp.html) uses the HTML template - HTML captured in page Twig and passed to a theme partial shows as text, and page titles and menu names are always text
- The
safe_emailfilter handles text that isn't valid UTF-8 - Deferred blocks inside a Twig capture in page content no longer cut the page's output short
- With frontmatter Twig on, a printed quote no longer breaks the pages build, and the shared lazy page index isn't used
- A slow JSON upload no longer holds up plugin updates, and JSON declared larger than the limit is refused unread
- Error pages and other pages built on the fly no longer fill the cache with entries that are never read
- Non-POST multipart requests with more parts than PHP allows are refused, and an over-long boundary is ignored
- Setting a Flex page header with a bare
header.name no longer replaces the whole header - Forms named
0are no longer dropped from the page that shows them - Form error messages are escaped unless they come from field validation, and an email field that isn't
multiplerefuses a list of addresses - A
routes.defaultpage header that doesn't start with a single slash is ignored - Text fields report a value that isn't valid UTF-8 as invalid instead of empty
- Wrong-typed values in the
append_url_extension,taxonomy,langanddateformatpage headers no longer cause errors - Creating, moving or copying a Flex page into a folder that differs from a sibling's only by order prefix or case is refused
- With Flex pages enabled, folders named
0or containing@@work like any other page instead of stopping the site - Deeply nested pages using
cascade_unpublishno longer slow the Admin2 page list to a timeout - Flex simple and file storage no longer lose objects when a key is renamed, and saving JSON that can't be encoded fails instead of leaving an empty file
- Creating a Flex object through the API applies the same field guards as updating one
- Flex uploads and removals no longer touch files in media folders shared with other objects
- A collection's page access filter matches nested access rules by name
- Page media is no longer served through the page route in a language the page has no file for
- WebP images get the generic placeholder thumbnail, so an empty
.webpno longer breaks pages that uselink()orlightbox() - A percentage resize on a page with an
@2ximage no longer fails - Compiled cache files are written without indentation, so a deeply nested header no longer produces a huge cache file
- Saving a binary YAML list item that would read back differently is refused, and a page the YAML parser can't read no longer stops the site
- A page with a malformed modular collection, sort or form name in its header no longer stops the page index from building
- [security] An image saved again after
url(false)orpath(false)is cached under a name that covers every action queued on it, so it can no longer overwrite the cached file of another image
v2.2.34 4 days ago
-
bin/grav install --devandbin/grav composer --devkeep Composer's dev dependencies. Both commands always ran Composer with--no-dev, so runningbin/grav installafter a plaincomposer installremoved the dev packages again #4422
-
- The scheduler no longer forgets a job's last run when a slow run overlaps the next minute's run, which made hourly jobs that ran on time show as never having run
- A browser that was signed in when its account was deleted is now signed out on its next request. Thanks to @inanna-malick for the report
v2.2.33 6 days ago
-
- Added PHP 8.6 compatibility (while keeping PHP 8.3+ support): replaced deprecated
spl_object_hash()calls withspl_object_id(), replacedis_a()on possible strings withinstanceof ArrayAccess, guardedparse_str()andUri::pathExists()against NUL-byteValueErrorexceptions, handledpreg_grep()andCollator::asort()error fallbacks, normalizedPage::taxonomy()input beforearray_walk(), and cleaned up remaining PHP 8.5+ deprecations (finfo_close(),Reflection*::setAccessible(),case ...;, null array offset inJob, andimagedestroy()in tests) - Faster page rendering on large sites: navigation menus work out the current page's parents once per request instead of once per menu item, and
active()/activeChild()and absolute URLs look up a single route instead of loading every route from the lazy page index - Sorting a collection no longer encodes every page's metadata as JSON to build its cache key, which took about 1 ms per sort on a 2,000-page blog
dateRangeandtype/typescollection filters read page dates and templates from the page index instead of loading every page in the collection (20–25% faster on a 2,000-page blog)- The Redis and Memcached cache drivers share one connection per request instead of opening one for each cache
- Smaller savings: linked CSS/JS pipeline bundles aren't read from disk on every request, the summary-divider regex only runs when the content has a divider, and
Collection::isFirst()/isLast()no longer copy the item list
- Added PHP 8.6 compatibility (while keeping PHP 8.3+ support): replaced deprecated
-
- A
media://(or other stream) image in a folder whose name starts with a number, such as a2022/09upload folder, rendered with a broken//media:2022//09/...address. Images with resize or crop actions and HTML<img>tags in content were affected too #4417 Utils::replaceLastOccurrence()no longer cuts in the wrong place when the text has multibyte characters before the match (/blog/über-uns.jsoncame out as/blog/über-uns.)Uri::post()with a filter no longer logs a PHP deprecation on every call. It compared against the deprecatedFILTER_SANITIZE_STRINGconstant, which PHP 9 removes- Removed a call to
ArrayAdapter::setNamespace(), which doesn't exist in Symfony Cache 7, from thearraycache driver, plus a few smaller static-analysis cleanups Grav\Framework\Psr7\ServerRequest,Grav\Framework\Logger\Processors\UserProcessorandGrav\Framework\Cache\Adapter\SessionCacheload again. Their method signatures no longer matched PSR-7 2.0, Monolog 3 and Grav's cache base class, so PHP stopped with a fatal error on first use- The Flex relationship classes no longer log PHP deprecations when they load
FlexIndex::findFirst()andreduce()return a result instead of always returningnullbin/gpm selfupgradeno longer callsstrftime(), which is deprecated and removed in PHP 9- Removed the unused
Scheduler\SchedulerControllerclass, which pointed to a scheduler class that no longer exists, and the scheduler service's setup for ascheduler.modern.enabledoption that called methods that were gone. The scheduler sets up its own queue, workers and history fromscheduler.modern - Replaced deprecated library calls (Cron
factory(), Monolog level constants, DoctrinegetOrderings(),utf8_encode()) and removed compatibility branches for Twig 1/2 and PHP 7 that could no longer run, plus an unused Monolog 1/2 shim - Object collection filtering (
ObjectExpressionVisitor) no longer extends Doctrine'sClosureExpressionVisitor, which Doctrine marks final and may lock in a future major version. It builds on Doctrine's abstractExpressionVisitorand handles AND/OR/NOT itself, with the same results
- A
v2.2.32 1 week ago
-
- Images referenced through a stream such as
media://now get asrcsetfrom their@2x/@3xsiblings, the same as page media admin2#222 - The Template select on a page's Advanced tab in classic admin follows the "Hide page types" and "Hide module types" settings, and keeps a page's own template when it is hidden admin#2244
- Images referenced through a stream such as
v2.2.31 1 week ago
v2.2.30 2 weeks ago
-
- Added Maltese (
mt, Malti) to the language codes #4408
- Added Maltese (
-
- A scheduler run started from the admin on a host where PHP's
proc_openis disabled skips the command jobs it can't start instead of recording them as failed, and still runs the jobs that call PHP, such as backups.Scheduler::canRun($job)tells the two apart #4397 - Retina images up to
@10xare grouped with their base image again, as on 1.7, instead of@5xand higher showing up as separate media. Missing steps are still only generated up to@4x, and deleting the base image no longer removes files above the limit that are listed on their own admin2#214 - A
summary:setting left empty inuser/config/site.yaml, such as one whose lines are all commented out, no longer stops page summaries with an "Undefined array key" error (seen on simplesearch results). Summaries fall back to the shipped settings instead simplesearch#211
- A scheduler run started from the admin on a host where PHP's
v2.2.35
Latest
3 days ago
-
- [security] The security fixes below were found by Anthropic's OSS Scanner
- [security] Page and taxonomy setters called from Twig in page content keep only plain data, and the session options in system configuration can't be read from page content
- [security] Page content can only change the page being rendered: setter methods called with arguments on any other page are refused
- [security] Saving a Flex group or account no longer drops a permission that overrides the one above it, such as a denied backup under allowed system access
- [security] The Twig
constanttest follows the content sandbox's function allowlist, a collection'ssort_flagsonly accepts sort flag names, andmedia_directory()only opens local media folders - [security] The asset pipeline and inline asset loader only read stylesheets and scripts inside the Grav folder, and asset lists that can't be encoded get a bundle of their own
- [security] Folders named like configuration files are no longer loaded as configuration (run
bin/grav clearonce after updating) - [security] The detailed error page no longer shows environment variable values or stack trace arguments
- [security] New sites show the simple error page by default, and
errors.displaycan be turned on inuser/config/system.yamlwhen the detailed page is needed - [security]
vardump()always prints its output as escaped plain text - [security] The debugger always hides protected configuration, its own token and login details, whatever
censoredis set to - [security] Absolute links in page content always use the site's own address and port, including a full custom base URL
- [security] A request that still carries a session id replaced at login gets a new empty session instead of the signed-in one
- [security] The built-in PHP server router applies its access rules when Grav runs from a subfolder with
GRAV_BASEDIR - [security] A Flex page's template only picks a blueprint when it names a registered page type, and only
.yamlfiles are trusted as blueprints - [security] Pending form uploads are stored in a folder named after a hash of the session id, so uploads pending during the update have to be added again
- [security] The
languagepage header is only used when it is a plain language code - [security] Saving an account through a form keeps only the avatar files the account already has
- [security] Passwords that haven't been hashed yet are no longer returned with account data
- [security] Creating a group that grants super admin needs a super admin, managing super admin accounts and groups through Flex forms needs super admin granted by name, and super admin groups in any environment's
groups.yamlcount for that protection - [security] A session is signed out when its account was re-created under the same username, and passkeys removed from an account are removed from its open sessions
- [security] Saving one group no longer undoes changes others made to the groups file at the same time, and refreshing a Flex object picks up access changes stored since it was loaded
- [security] Saving a Flex object clears its cached copy for every host name, and accounts with digit-only usernames are found again with folder storage
- [security] Creating, updating or checking a Flex object can no longer replace another object, take a storage key from submitted data or skip the permission check when no user is passed
- [security] Saving a page through a front-end Flex pages form no longer replaces another page when its source page was deleted or moved, and an empty template no longer renames the page file
- [security] Front-end Flex pages forms always check create permission on the parent page, and page rules apply to groups with digit-only names and never to a disabled account or an unfinished login
- [security] With Flex pages enabled, each page keeps the language of its own file, pages in suffixed default-language files pass their permissions to their children, and deleting a folder with sub-folders the page index can't list is refused
- [security] A page's
routesaliases, default or canonical route only claim URLs that no other page already has by its folder or slug - [security] Uploaded file names with
.varamong their extensions are refused, and the shipped.htaccessturns off Apache's type-map handler (added to existing sites on update) - [security] An uploaded SVG is sanitized even when saving its metadata file fails
- [security] Images that wouldn't fit in PHP's memory limit, JPEGs with more than 100 scans and oversized
zoomCropcanvases are served as the original, and fixing an image's orientation reads only its Exif orientation - [security] Checking form input for XSS takes time in line with the input's size and stops at the first flagged value
- [security] Footnote labels and abbreviation meanings in Markdown Extra are escaped, and a page whose frontmatter can't be read shows the invalid frontmatter page instead of being served as content
- Flex pages protect Twig tags from Markdown with the same placeholders regular pages use, and removing a
markdown="1"attribute no longer joins the text around it - The invalid frontmatter page shows the parser's message as plain text
- A module renders its template in the format of the page that embeds it, and a format that isn't a plain extension (such as
amp.html) uses the HTML template - HTML captured in page Twig and passed to a theme partial shows as text, and page titles and menu names are always text
- The
safe_emailfilter handles text that isn't valid UTF-8 - Deferred blocks inside a Twig capture in page content no longer cut the page's output short
- With frontmatter Twig on, a printed quote no longer breaks the pages build, and the shared lazy page index isn't used
- A slow JSON upload no longer holds up plugin updates, and JSON declared larger than the limit is refused unread
- Error pages and other pages built on the fly no longer fill the cache with entries that are never read
- Non-POST multipart requests with more parts than PHP allows are refused, and an over-long boundary is ignored
- Setting a Flex page header with a bare
header.name no longer replaces the whole header - Forms named
0are no longer dropped from the page that shows them - Form error messages are escaped unless they come from field validation, and an email field that isn't
multiplerefuses a list of addresses - A
routes.defaultpage header that doesn't start with a single slash is ignored - Text fields report a value that isn't valid UTF-8 as invalid instead of empty
- Wrong-typed values in the
append_url_extension,taxonomy,langanddateformatpage headers no longer cause errors - Creating, moving or copying a Flex page into a folder that differs from a sibling's only by order prefix or case is refused
- With Flex pages enabled, folders named
0or containing@@work like any other page instead of stopping the site - Deeply nested pages using
cascade_unpublishno longer slow the Admin2 page list to a timeout - Flex simple and file storage no longer lose objects when a key is renamed, and saving JSON that can't be encoded fails instead of leaving an empty file
- Creating a Flex object through the API applies the same field guards as updating one
- Flex uploads and removals no longer touch files in media folders shared with other objects
- A collection's page access filter matches nested access rules by name
- Page media is no longer served through the page route in a language the page has no file for
- WebP images get the generic placeholder thumbnail, so an empty
.webpno longer breaks pages that uselink()orlightbox() - A percentage resize on a page with an
@2ximage no longer fails - Compiled cache files are written without indentation, so a deeply nested header no longer produces a huge cache file
- Saving a binary YAML list item that would read back differently is refused, and a page the YAML parser can't read no longer stops the site
- A page with a malformed modular collection, sort or form name in its header no longer stops the page index from building
- [security] An image saved again after
url(false)orpath(false)is cached under a name that covers every action queued on it, so it can no longer overwrite the cached file of another image
v2.2.34 4 days ago
-
bin/grav install --devandbin/grav composer --devkeep Composer's dev dependencies. Both commands always ran Composer with--no-dev, so runningbin/grav installafter a plaincomposer installremoved the dev packages again #4422
-
- The scheduler no longer forgets a job's last run when a slow run overlaps the next minute's run, which made hourly jobs that ran on time show as never having run
- A browser that was signed in when its account was deleted is now signed out on its next request. Thanks to @inanna-malick for the report
v2.2.33 6 days ago
-
- Added PHP 8.6 compatibility (while keeping PHP 8.3+ support): replaced deprecated
spl_object_hash()calls withspl_object_id(), replacedis_a()on possible strings withinstanceof ArrayAccess, guardedparse_str()andUri::pathExists()against NUL-byteValueErrorexceptions, handledpreg_grep()andCollator::asort()error fallbacks, normalizedPage::taxonomy()input beforearray_walk(), and cleaned up remaining PHP 8.5+ deprecations (finfo_close(),Reflection*::setAccessible(),case ...;, null array offset inJob, andimagedestroy()in tests) - Faster page rendering on large sites: navigation menus work out the current page's parents once per request instead of once per menu item, and
active()/activeChild()and absolute URLs look up a single route instead of loading every route from the lazy page index - Sorting a collection no longer encodes every page's metadata as JSON to build its cache key, which took about 1 ms per sort on a 2,000-page blog
dateRangeandtype/typescollection filters read page dates and templates from the page index instead of loading every page in the collection (20–25% faster on a 2,000-page blog)- The Redis and Memcached cache drivers share one connection per request instead of opening one for each cache
- Smaller savings: linked CSS/JS pipeline bundles aren't read from disk on every request, the summary-divider regex only runs when the content has a divider, and
Collection::isFirst()/isLast()no longer copy the item list
- Added PHP 8.6 compatibility (while keeping PHP 8.3+ support): replaced deprecated
-
- A
media://(or other stream) image in a folder whose name starts with a number, such as a2022/09upload folder, rendered with a broken//media:2022//09/...address. Images with resize or crop actions and HTML<img>tags in content were affected too #4417 Utils::replaceLastOccurrence()no longer cuts in the wrong place when the text has multibyte characters before the match (/blog/über-uns.jsoncame out as/blog/über-uns.)Uri::post()with a filter no longer logs a PHP deprecation on every call. It compared against the deprecatedFILTER_SANITIZE_STRINGconstant, which PHP 9 removes- Removed a call to
ArrayAdapter::setNamespace(), which doesn't exist in Symfony Cache 7, from thearraycache driver, plus a few smaller static-analysis cleanups Grav\Framework\Psr7\ServerRequest,Grav\Framework\Logger\Processors\UserProcessorandGrav\Framework\Cache\Adapter\SessionCacheload again. Their method signatures no longer matched PSR-7 2.0, Monolog 3 and Grav's cache base class, so PHP stopped with a fatal error on first use- The Flex relationship classes no longer log PHP deprecations when they load
FlexIndex::findFirst()andreduce()return a result instead of always returningnullbin/gpm selfupgradeno longer callsstrftime(), which is deprecated and removed in PHP 9- Removed the unused
Scheduler\SchedulerControllerclass, which pointed to a scheduler class that no longer exists, and the scheduler service's setup for ascheduler.modern.enabledoption that called methods that were gone. The scheduler sets up its own queue, workers and history fromscheduler.modern - Replaced deprecated library calls (Cron
factory(), Monolog level constants, DoctrinegetOrderings(),utf8_encode()) and removed compatibility branches for Twig 1/2 and PHP 7 that could no longer run, plus an unused Monolog 1/2 shim - Object collection filtering (
ObjectExpressionVisitor) no longer extends Doctrine'sClosureExpressionVisitor, which Doctrine marks final and may lock in a future major version. It builds on Doctrine's abstractExpressionVisitorand handles AND/OR/NOT itself, with the same results
- A
v2.2.32 1 week ago
-
- Images referenced through a stream such as
media://now get asrcsetfrom their@2x/@3xsiblings, the same as page media admin2#222 - The Template select on a page's Advanced tab in classic admin follows the "Hide page types" and "Hide module types" settings, and keeps a page's own template when it is hidden admin#2244
- Images referenced through a stream such as
v2.2.31 1 week ago
v2.2.30 2 weeks ago
-
- Added Maltese (
mt, Malti) to the language codes #4408
- Added Maltese (
-
- A scheduler run started from the admin on a host where PHP's
proc_openis disabled skips the command jobs it can't start instead of recording them as failed, and still runs the jobs that call PHP, such as backups.Scheduler::canRun($job)tells the two apart #4397 - Retina images up to
@10xare grouped with their base image again, as on 1.7, instead of@5xand higher showing up as separate media. Missing steps are still only generated up to@4x, and deleting the base image no longer removes files above the limit that are listed on their own admin2#214 - A
summary:setting left empty inuser/config/site.yaml, such as one whose lines are all commented out, no longer stops page summaries with an "Undefined array key" error (seen on simplesearch results). Summaries fall back to the shipped settings instead simplesearch#211
- A scheduler run started from the admin on a host where PHP's