grav README

The project's README from github.com/getgrav/grav. As one markdown file: README.md.

Grav

PHPStan Discord PHP Tests OpenCollective 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

Migrating from Grav 1.x to Grav 2.0? Grav 2.0 is a major release with a PHP 8.3+ baseline and a modernized core, and upgrading requires a dedicated migration — bin/gpm selfupgrade alone will not take you across the 1.x → 2.x boundary. Follow the step-by-step guide at getgrav.org/migrate-to-2 before running any upgrade command.

Within a major version, bin/gpm selfupgrade handles point upgrades. The following guides cover in-place upgrades between minor releases of Grav 1.x:

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]

Supporters

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

Sponsors

Support Grav with a yearly donation to help us continue development. [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:

grav (getgrav/grav)

content-management
Searching Database…

15.7K ·GitHub
What is this?Grav is a fast, flat-file CMS: a web platform for building sites where content lives in Markdown files rather than a database. Zero installation — you extract the ZIP archive and you are already up and running.
So there is no database at all — where does my content live?Nowhere but files: pages are Markdown, configuration is YAML, and templates are Twig. There is no database layer to install or maintain.
How do I get a site running?Three routes: download a ready-built package from the Downloads page, create the project with Composer, or clone the repo into your webroot and run the bin/grav CLI to install plugin and theme dependencies.
What does my server need to run it?PHP 8.3 or higher with the required PHP modules, served by Apache or IIS. That is the whole stack — no database server to stand up.
Is updating to new versions painless?Within a major version, yes: bin/gpm selfupgrade handles point upgrades. Crossing from 1.x to 2.0 is different — it needs a dedicated migration, so follow the guide at getgrav.org/migrate-to-2 before running any upgrade command.
Do I need to be a PHP developer to write content for it?No — day-to-day content is just Markdown with YAML configuration. PHP only matters if you want to develop your own plugins or themes.
How do I add plugins or themes?With the Grav Package Manager (GPM): bin/gpm lists everything available and installs what you pick from the command line. It is the preferred route over downloading plugins or themes manually.
What is under the hood?Twig for templating, Markdown rendered by Parsedown, YAML for configuration, Symfony components for caching, events and the CLI console, the Pimple dependency-injection container, and the Gregwar library for dynamic image manipulation.
Is there a quicker way to start than a blank site?Yes — free Skeletons: pre-built site packages you can grab instead of assembling the core, plugins and themes yourself. They are linked from the Getting Started section of the docs.
Is it free to use?Yes — Grav is open source under the MIT license. The project asks for voluntary monthly or yearly donations from backers and sponsors to fund development.
What are similar projects?Kooboo, gophenberg, halo, payload, Instatic, october, flarum, zola
Creator
getgrav
Size
33.2 MB
Stars
15.7K
Age
12y
Commits · 90 Days