Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →
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.

STABLE · v2.2.1 · updated 12 hours ago

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

  1. Download either the Grav Core or Grav Core + Admin2 plugin installation package.
  2. Extract the zip file into your webroot.
  3. 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.1 Latest 12 hours ago
    • The .htaccess files under user/ no longer use mod_rewrite, so hosts that broke on them, such as some shared Apache setups, serve the admin, theme files and images again. Upgrading replaces the copies Grav wrote and leaves edited ones alone (#4309)
v2.2.0 2 days ago
    • Rebuilding the pages cache no longer writes a compiled file for every page, so the first request after a cache clear is much faster on large sites.
    • A pages rebuild no longer loads a compiled file for every page into OPcache, so large sites stop pushing the rest of Grav's cached code out of memory.
    • A pages rebuild reuses the page headers it read last time, so rebuilding after editing one page stays as quick as before.
    • Checking whether pages changed now looks only at the page folders and files Grav already knows about instead of scanning the whole pages folder, which makes requests on large sites faster.
    • Only one request at a time checks whether pages changed, and the others keep using the last result meanwhile.
    • When the pages cache has to be rebuilt, one request rebuilds it and the others wait and use its result instead of all rebuilding at once.
    • Saving or deleting a page through Grav now updates the pages cache on the next request instead of waiting for the change check, and plugins can do the same by calling Pages::markChanged().
    • That change notice is kept in a small file rather than the cache, so a page saved from the command line is picked up by the website even when the two use different cache drivers.
    • A new pages.frontmatter.native_yaml setting reads page frontmatter with the much faster YAML extension when the server has it installed. It is off by default because the extension reads unquoted dates and yes/no differently.
    • Translations are now prepared one language at a time, when a request first needs that language, so the first request after a cache clear no longer reads every language that core and the plugins ship.
    • Editing a language file now rebuilds only that language instead of every language.
    • The pages cache is smaller because it no longer keeps a second, raw copy of every page's frontmatter.
    • Listing every page, which the sitemap and @page.descendants collections do, is several times faster on large sites.
    • Page ETags are calculated with a much faster hash.
    • Configuration and translation caches built by a request are loaded into OPcache after the response has been sent, instead of making that request wait.
    • Rebuilding the pages cache after an edit no longer reads the pages and folders that did not change, so on large sites it takes about half the time it did before.
    • With pages.lazy_index on, lists of pages such as menus, taxonomy pages, @page.descendants collections and the sitemap load their pages in a few batches instead of one at a time.
    • pages.lazy_index now defaults to auto, which uses the page index on sites with 1,000 pages or more and the classic pages cache on smaller ones, so large sites load pages faster and use far less memory without any setup.
    • Plugin classes load faster because Grav now asks only the plugin autoloaders that can have the class, in the same order as before.
    • A modular page can set cache_modules: true to cache its modules' output, while modules with their own Twig or a form, logged-in visitors and form submissions are always rendered fresh.
    • A new session.lazy setting, off by default, starts the session only when a visitor needs one, so anonymous page views can go out without a session cookie and be cached by a proxy or CDN.
    • CSS minification now uses wikimedia/minify, which understands modern CSS and is about 15 to 25 times faster on real stylesheets.
    • Sites on Apache older than 2.4.8, common on Plesk and CentOS 7 hosts, no longer answer 500 for everything under user/ after upgrading, and upgrading fixes the .htaccess files earlier releases wrote there (grav-plugin-admin2#179)
    • Plugins' onShutdown work runs again after Admin Next saves on sites with session.read_and_close on, when another plugin had already finished the response.
    • Deleting or renaming a page folder is now picked up without clearing the cache.
    • The file change check no longer counts files that only contain .md somewhere in their name, such as page.md.bak, or whose name merely ends in yaml.
    • Searching Flex pages now matches a page's route as well as its title, slug and menu.
    • calc() inside @media, @supports and @container conditions keeps its spacing when CSS is minified, so browsers no longer drop those blocks.
    • A stylesheet with a quote that is never closed is now served unminified instead of losing the rules that follow it.
v2.1.12 3 days ago
    • SVG fills that point at a gradient on the same page, such as fill: url(#linear-gradient), keep working with CSS pipelining on. Thanks @wakqasahmed #2784
    • CSS pipelining no longer breaks url() values that aren't file paths, such as about:blank or blob: links, and now correctly rewrites paths written as URL(...) or with spaces inside the brackets.
v2.1.11 3 days ago
    • Files under .well-known/ are now served when running Grav with the built-in PHP server (bin/grav server), matching the shipped web server configs. Thanks @wakqasahmed #4016
    • Themes whose stylesheets use @import, such as Learn2, look right again with CSS pipelining and minification on. 2.1.10 could move a block of the theme's styles to the top of the combined file along with the import. Thanks @Gazoo #4330
v2.1.10 4 days ago
    • The shipped web server configs now block running PHP and other scripts in images/ and assets/, and upgrading adds the same rule to an existing site's .htaccess.
    • Uploaded filenames are now rejected when any extension in the name is a dangerous one, not just the last, so evil.php.jpg can't run as PHP on servers that map PHP with AddHandler.
    • PHP-executable extensions are now always treated as dangerous uploads, even if a site's config drops them from the list.
    • webserver-configs/htaccess.txt now blocks tmp/ like the root .htaccess does.
    • File uploads sent with PUT or PATCH now drop any folder path from the filename, as PHP already does for POST uploads.
    • Image derivatives now include the maximum width you ask for. Thanks @wakqasahmed #2429
    • Multipart PATCH requests are now parsed, instead of being skipped because of a typo in the method check.
    • A page whose summary: header is text rather than summary settings no longer crashes when its summary is read. Grav reads summary in a header as settings (enabled, size, format), and a site that used it for a page's lede broke the page's Markdown version (.md or Accept: text/markdown), which is what AI crawlers ask for. The text is now ignored as settings and the site's own summary settings apply.
    • A stylesheet the CSS minifier can't handle no longer breaks the page. Its group is served unminified instead, in the original order, and cached like any other bundle. Thanks @wakqasahmed and @sridharkalaibala #4305
    • A script the JS minifier can't handle no longer changes the order scripts load in, for the same reason. Thanks @wakqasahmed #4313
    • Space-separated rgb() and hsl() colours are no longer mangled or dropped when CSS minification is on. Thanks @onetrev #4305
    • Visiting a real folder such as /user/pages no longer sends the browser into an endless redirect loop. Thanks @3e33 #4325
    • Watermarks now land in the right place on resized, cropped and derivative images, including retina files, instead of being placed for the original size or missed entirely. Thanks @phmg701 #4322
    • Watermarks now follow the position set in configuration, and an unknown position or a bare ?watermark no longer breaks the image. #4322
v2.1.9 5 days ago
    • The bundled robots.txt no longer blocks pipelined CSS and JS. Disallow: /assets/ was removed, because it beat the shorter Allow: *.css$ rules and stopped Google from rendering pages on sites with the asset pipeline turned on. The CSS and JS rules now start with /, also match URLs with a query string, and explicitly allow assets under system/ and user/plugins/. Upgrades never replace robots.txt, so existing sites need to apply this change by hand.
v2.2.1 Latest 12 hours ago
    • The .htaccess files under user/ no longer use mod_rewrite, so hosts that broke on them, such as some shared Apache setups, serve the admin, theme files and images again. Upgrading replaces the copies Grav wrote and leaves edited ones alone (#4309)
v2.2.0 2 days ago
    • Rebuilding the pages cache no longer writes a compiled file for every page, so the first request after a cache clear is much faster on large sites.
    • A pages rebuild no longer loads a compiled file for every page into OPcache, so large sites stop pushing the rest of Grav's cached code out of memory.
    • A pages rebuild reuses the page headers it read last time, so rebuilding after editing one page stays as quick as before.
    • Checking whether pages changed now looks only at the page folders and files Grav already knows about instead of scanning the whole pages folder, which makes requests on large sites faster.
    • Only one request at a time checks whether pages changed, and the others keep using the last result meanwhile.
    • When the pages cache has to be rebuilt, one request rebuilds it and the others wait and use its result instead of all rebuilding at once.
    • Saving or deleting a page through Grav now updates the pages cache on the next request instead of waiting for the change check, and plugins can do the same by calling Pages::markChanged().
    • That change notice is kept in a small file rather than the cache, so a page saved from the command line is picked up by the website even when the two use different cache drivers.
    • A new pages.frontmatter.native_yaml setting reads page frontmatter with the much faster YAML extension when the server has it installed. It is off by default because the extension reads unquoted dates and yes/no differently.
    • Translations are now prepared one language at a time, when a request first needs that language, so the first request after a cache clear no longer reads every language that core and the plugins ship.
    • Editing a language file now rebuilds only that language instead of every language.
    • The pages cache is smaller because it no longer keeps a second, raw copy of every page's frontmatter.
    • Listing every page, which the sitemap and @page.descendants collections do, is several times faster on large sites.
    • Page ETags are calculated with a much faster hash.
    • Configuration and translation caches built by a request are loaded into OPcache after the response has been sent, instead of making that request wait.
    • Rebuilding the pages cache after an edit no longer reads the pages and folders that did not change, so on large sites it takes about half the time it did before.
    • With pages.lazy_index on, lists of pages such as menus, taxonomy pages, @page.descendants collections and the sitemap load their pages in a few batches instead of one at a time.
    • pages.lazy_index now defaults to auto, which uses the page index on sites with 1,000 pages or more and the classic pages cache on smaller ones, so large sites load pages faster and use far less memory without any setup.
    • Plugin classes load faster because Grav now asks only the plugin autoloaders that can have the class, in the same order as before.
    • A modular page can set cache_modules: true to cache its modules' output, while modules with their own Twig or a form, logged-in visitors and form submissions are always rendered fresh.
    • A new session.lazy setting, off by default, starts the session only when a visitor needs one, so anonymous page views can go out without a session cookie and be cached by a proxy or CDN.
    • CSS minification now uses wikimedia/minify, which understands modern CSS and is about 15 to 25 times faster on real stylesheets.
    • Sites on Apache older than 2.4.8, common on Plesk and CentOS 7 hosts, no longer answer 500 for everything under user/ after upgrading, and upgrading fixes the .htaccess files earlier releases wrote there (grav-plugin-admin2#179)
    • Plugins' onShutdown work runs again after Admin Next saves on sites with session.read_and_close on, when another plugin had already finished the response.
    • Deleting or renaming a page folder is now picked up without clearing the cache.
    • The file change check no longer counts files that only contain .md somewhere in their name, such as page.md.bak, or whose name merely ends in yaml.
    • Searching Flex pages now matches a page's route as well as its title, slug and menu.
    • calc() inside @media, @supports and @container conditions keeps its spacing when CSS is minified, so browsers no longer drop those blocks.
    • A stylesheet with a quote that is never closed is now served unminified instead of losing the rules that follow it.
v2.1.12 3 days ago
    • SVG fills that point at a gradient on the same page, such as fill: url(#linear-gradient), keep working with CSS pipelining on. Thanks @wakqasahmed #2784
    • CSS pipelining no longer breaks url() values that aren't file paths, such as about:blank or blob: links, and now correctly rewrites paths written as URL(...) or with spaces inside the brackets.
v2.1.11 3 days ago
    • Files under .well-known/ are now served when running Grav with the built-in PHP server (bin/grav server), matching the shipped web server configs. Thanks @wakqasahmed #4016
    • Themes whose stylesheets use @import, such as Learn2, look right again with CSS pipelining and minification on. 2.1.10 could move a block of the theme's styles to the top of the combined file along with the import. Thanks @Gazoo #4330
v2.1.10 4 days ago
    • The shipped web server configs now block running PHP and other scripts in images/ and assets/, and upgrading adds the same rule to an existing site's .htaccess.
    • Uploaded filenames are now rejected when any extension in the name is a dangerous one, not just the last, so evil.php.jpg can't run as PHP on servers that map PHP with AddHandler.
    • PHP-executable extensions are now always treated as dangerous uploads, even if a site's config drops them from the list.
    • webserver-configs/htaccess.txt now blocks tmp/ like the root .htaccess does.
    • File uploads sent with PUT or PATCH now drop any folder path from the filename, as PHP already does for POST uploads.
    • Image derivatives now include the maximum width you ask for. Thanks @wakqasahmed #2429
    • Multipart PATCH requests are now parsed, instead of being skipped because of a typo in the method check.
    • A page whose summary: header is text rather than summary settings no longer crashes when its summary is read. Grav reads summary in a header as settings (enabled, size, format), and a site that used it for a page's lede broke the page's Markdown version (.md or Accept: text/markdown), which is what AI crawlers ask for. The text is now ignored as settings and the site's own summary settings apply.
    • A stylesheet the CSS minifier can't handle no longer breaks the page. Its group is served unminified instead, in the original order, and cached like any other bundle. Thanks @wakqasahmed and @sridharkalaibala #4305
    • A script the JS minifier can't handle no longer changes the order scripts load in, for the same reason. Thanks @wakqasahmed #4313
    • Space-separated rgb() and hsl() colours are no longer mangled or dropped when CSS minification is on. Thanks @onetrev #4305
    • Visiting a real folder such as /user/pages no longer sends the browser into an endless redirect loop. Thanks @3e33 #4325
    • Watermarks now land in the right place on resized, cropped and derivative images, including retina files, instead of being placed for the original size or missed entirely. Thanks @phmg701 #4322
    • Watermarks now follow the position set in configuration, and an unknown position or a bare ?watermark no longer breaks the image. #4322
v2.1.9 5 days ago
    • The bundled robots.txt no longer blocks pipelined CSS and JS. Disallow: /assets/ was removed, because it beat the shorter Allow: *.css$ rules and stopped Google from rendering pages on sites with the asset pipeline turned on. The CSS and JS rules now start with /, also match URLs with a query string, and explicitly allow assets under system/ and user/plugins/. Upgrades never replace robots.txt, so existing sites need to apply this change by hand.