2016-04-11 21:02:59 -06:00
#  Grav
2015-02-18 22:21:38 -07:00
2019-03-13 21:35:49 -06:00
[](https://github.com/phpstan/phpstan)
2018-11-15 16:28:15 -07:00
[](https://chat.getgrav.org)
2022-02-08 08:40:59 +02:00
[](https://github.com/getgrav/grav/actions?query=workflow%3A%22PHP+Tests%22) [](#backers ) [](#supporters ) [](#sponsors )
2014-08-02 11:29:10 -07:00
2015-04-17 10:59:03 -07:00
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.
2014-08-11 10:49:54 -07:00
2015-10-15 16:28:06 -04:00
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:
2014-08-11 10:49:54 -07:00
2022-01-11 17:55:24 +01:00
* [Twig Templating ](https://twig.symfony.com/ ): for powerful control of the user interface
2019-02-12 20:14:28 +01:00
* [Markdown ](https://en.wikipedia.org/wiki/Markdown ): for easy content creation
* [YAML ](https://yaml.org ): for simple configuration
* [Parsedown ](https://parsedown.org/ ): for fast Markdown and Markdown Extra support
* [Doctrine Cache ](https://www.doctrine-project.org/projects/doctrine-orm/en/latest/reference/caching.html ): layer for performance
2022-02-08 08:40:59 +02:00
* [Pimple Dependency Injection Container ](https://github.com/silexphp/Pimple ): for extensibility and maintainability
2019-02-12 20:14:28 +01:00
* [Symfony Event Dispatcher ](https://symfony.com/doc/current/components/event_dispatcher/introduction.html ): for plugin event handling
* [Symfony Console ](https://symfony.com/doc/current/components/console/introduction.html ): for CLI interface
2014-08-30 14:34:47 -06:00
* [Gregwar Image Library ](https://github.com/Gregwar/Image ): for dynamic image manipulation
2014-08-11 10:49:54 -07:00
2015-08-16 09:10:53 +02:00
# Requirements
2020-11-13 16:01:26 -07:00
- PHP 7.3.6 or higher. Check the [required modules list ](https://learn.getgrav.org/basics/requirements#php-requirements )
2017-02-08 10:55:57 -07:00
- Check the [Apache ](https://learn.getgrav.org/basics/requirements#apache-requirements ) or [IIS ](https://learn.getgrav.org/basics/requirements#iis-requirements ) requirements
2015-08-16 09:10:53 +02:00
2021-01-19 11:27:14 +02:00
# Documentation
The full documentation can be found from [learn.getgrav.org ](https://learn.getgrav.org ).
2014-08-13 14:13:14 -05:00
# QuickStart
2014-08-12 16:52:47 -06:00
2016-01-05 11:14:04 +01:00
These are the options to get Grav:
2014-08-12 16:52:47 -06:00
### Downloading a Grav Package
2017-02-08 10:55:57 -07:00
You can download a **ready-built** package from the [Downloads page on https://getgrav.org ](https://getgrav.org/downloads )
2014-08-12 16:52:47 -06:00
2016-04-11 21:02:59 -06:00
### With Composer
2016-01-05 11:14:04 +01:00
You can create a new project with the latest **stable** Grav release with the following command:
2025-01-18 13:39:11 +01:00
```bash
composer create-project getgrav/grav ~/webroot/grav
2016-01-05 11:14:04 +01:00
```
2014-08-12 16:52:47 -06:00
### 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:
2025-01-18 13:39:11 +01:00
```bash
cd ~/webroot
git clone https://github.com/getgrav/grav.git
2014-08-12 16:52:47 -06:00
```
2017-02-08 10:55:57 -07:00
2. Install the **plugin** and **theme dependencies** by using the [Grav CLI application ](https://learn.getgrav.org/advanced/grav-cli ) `bin/grav` :
2025-01-18 13:39:11 +01:00
```bash
cd ~/webroot/grav
bin/grav install
2014-08-12 16:52:47 -06:00
```
2017-02-08 10:55:57 -07:00
Check out the [install procedures ](https://learn.getgrav.org/basics/installation ) for more information.
2014-08-12 16:52:47 -06:00
2014-12-05 11:33:30 -07:00
# Adding Functionality
2017-02-08 10:55:57 -07:00
You can download [plugins ](https://getgrav.org/downloads/plugins ) or [themes ](https://getgrav.org/downloads/themes ) manually from the appropriate tab on the [Downloads page on https://getgrav.org ](https://getgrav.org/downloads ), but the preferred solution is to use the [Grav Package Manager ](https://learn.getgrav.org/advanced/grav-gpm ) or `GPM` :
2014-12-05 11:33:30 -07:00
2025-01-18 13:39:11 +01:00
```bash
bin/gpm index
2014-12-05 11:33:30 -07:00
```
2015-10-28 17:55:23 +09:00
This will display all the available plugins and then you can install one or more with:
2014-12-05 11:33:30 -07:00
2025-01-18 13:39:11 +01:00
```bash
bin/gpm install < plugin / theme >
2014-12-05 11:33:30 -07:00
```
# Updating
2017-02-08 10:55:57 -07:00
To update Grav you should use the [Grav Package Manager ](https://learn.getgrav.org/advanced/grav-gpm ) or `GPM` :
2014-12-05 11:33:30 -07:00
2025-01-18 13:39:11 +01:00
```bash
bin/gpm selfupgrade
2014-12-05 11:33:30 -07:00
```
To update plugins and themes:
2025-01-18 13:39:11 +01:00
```bash
bin/gpm update
2014-12-05 11:33:30 -07:00
```
2021-01-19 11:27:14 +02:00
## Upgrading from older version
* [Upgrading to Grav 1.7 ](https://learn.getgrav.org/16/advanced/grav-development/grav-17-upgrade-guide )
* [Upgrading to Grav 1.6 ](https://learn.getgrav.org/16/advanced/grav-development/grav-16-upgrade-guide )
* [Upgrading from Grav <1.6 ](https://learn.getgrav.org/16/advanced/grav-development/grav-15-upgrade-guide )
2014-08-11 10:49:54 -07:00
2014-08-15 13:26:02 -07:00
# Contributing
2017-06-15 16:04:08 +02:00
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 ](CONTRIBUTING.md ) for more guidance on this topic.
2014-08-15 13:26:02 -07:00
2017-06-15 16:04:08 +02:00
## Security issues
2017-11-02 10:21:14 +11:00
If you discover a possible security issue related to Grav or one of its plugins, please email the core team at contact@getgrav .org and we'll address it as soon as possible.
2014-08-15 13:26:02 -07:00
2014-08-13 14:13:14 -05:00
# Getting Started
2017-02-08 10:55:57 -07:00
* [What is Grav? ](https://learn.getgrav.org/basics/what-is-grav )
* [Install ](https://learn.getgrav.org/basics/installation ) Grav in few seconds
* Understand the [Configuration ](https://learn.getgrav.org/basics/grav-configuration )
* Take a peek at our available free [Skeletons ](https://getgrav.org/downloads/skeletons )
2018-11-15 16:30:44 -07:00
* If you have questions, jump on our [Discord Chat Server ](https://chat.getgrav.org )!
2014-08-11 13:01:11 -05:00
* Have fun!
2014-08-11 10:49:54 -07:00
2016-01-10 19:22:23 +01:00
# Exploring More
2014-08-13 14:13:14 -05:00
2017-02-08 10:55:57 -07:00
* Have a look at our [Basic Tutorial ](https://learn.getgrav.org/basics/basic-tutorial )
* Dive into more [advanced ](https://learn.getgrav.org/advanced ) functions
2017-11-02 10:21:14 +11:00
* Learn about the [Grav CLI ](https://learn.getgrav.org/cli-console/grav-cli )
* Review examples in the [Grav Cookbook ](https://learn.getgrav.org/cookbook )
2019-03-21 19:06:12 -07:00
* More [Awesome Grav Stuff ](https://github.com/getgrav/awesome-grav )
2014-08-11 10:49:54 -07:00
2017-01-30 11:47:09 -08:00
# Backers
2021-12-15 12:19:01 -08:00
Support Grav with a monthly donation to help us continue development. [[Become a backer ](https://opencollective.com/grav/contribute )]
2017-01-30 11:47:09 -08:00
2018-11-13 23:05:18 -08:00
< img src = "https://opencollective.com/grav/tiers/backers.svg?avatarHeight=36&width=600" / >
2017-01-30 11:47:09 -08:00
2021-12-15 12:19:01 -08:00
# Supporters
Support Grav with a monthly donation to help us continue development. [[Become a supporter ](https://opencollective.com/grav/contribute )]
< img src = "https://opencollective.com/grav/tiers/supporters.svg?avatarHeight=36&width=600" / >
2017-01-30 11:47:09 -08:00
# Sponsors
2021-12-15 12:19:01 -08:00
Support Grav with a yearly donation to help us continue development. [[Become a sponsor ](https://opencollective.com/grav/contribute )]
2017-02-15 15:14:51 -08:00
2018-11-13 23:05:18 -08:00
< img src = "https://opencollective.com/grav/tiers/sponsors.svg?avatarHeight=36&width=600" / >
2017-01-30 11:47:09 -08:00
2014-08-13 14:13:14 -05:00
# License
2015-12-06 13:24:27 -08:00
See [LICENSE ](LICENSE.txt )
2014-08-15 13:26:02 -07:00
[gitflow-model]: http://nvie.com/posts/a-successful-git-branching-model/
2014-08-15 15:31:49 -05:00
[gitflow-extensions]: https://github.com/nvie/gitflow
2016-01-10 19:22:23 +01:00
# Running Tests
2021-01-19 11:27:14 +02:00
First install the dev dependencies by running `composer install` from the Grav root.
2018-11-15 16:29:08 -07:00
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.
2016-01-22 10:39:36 +01:00
You can also run a single unit test file, e.g. `composer test tests/unit/Grav/Common/AssetsTest.php`
2021-01-19 11:27:14 +02:00
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