2016-04-12 05:02:59 +02:00
#  Grav
2015-02-19 06:21:38 +01:00
2019-03-14 04:35:49 +01:00
[](https://github.com/phpstan/phpstan)
2018-11-16 00:28:15 +01:00
[](https://chat.getgrav.org)
2021-02-08 02:31:58 +01:00
[](https://github.com/getgrav/grav/actions?query=workflow%3A%22PHP+Tests%22) [](#backers) [](#sponsors)
2014-08-02 20:29:10 +02:00
2015-04-17 19:59:03 +02: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 19:49:54 +02:00
2015-10-15 22:28:06 +02: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 19:49:54 +02:00
2019-02-12 20:14:28 +01:00
* [Twig Templating ](https://twig.sensiolabs.org/ ): for powerful control of the user interface
* [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
* [Pimple Dependency Injection Container ](https://pimple.sensiolabs.org/ ): for extensibility and maintainability
* [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 22:34:47 +02:00
* [Gregwar Image Library ](https://github.com/Gregwar/Image ): for dynamic image manipulation
2014-08-11 19:49:54 +02:00
2015-08-16 09:10:53 +02:00
# Requirements
2020-11-14 00:01:26 +01:00
- PHP 7.3.6 or higher. Check the [required modules list ](https://learn.getgrav.org/basics/requirements#php-requirements )
2017-02-08 18:55:57 +01: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 10:27:14 +01:00
# Documentation
The full documentation can be found from [learn.getgrav.org ](https://learn.getgrav.org ).
2014-08-13 21:13:14 +02:00
# QuickStart
2014-08-13 00:52:47 +02:00
2016-01-05 11:14:04 +01:00
These are the options to get Grav:
2014-08-13 00:52:47 +02:00
### Downloading a Grav Package
2017-02-08 18:55:57 +01:00
You can download a **ready-built** package from the [Downloads page on https://getgrav.org ](https://getgrav.org/downloads )
2014-08-13 00:52:47 +02:00
2016-04-12 05:02:59 +02: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:
```
$ composer create-project getgrav/grav ~/webroot/grav
```
2014-08-13 00:52:47 +02: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:
```
$ cd ~/webroot
$ git clone https://github.com/getgrav/grav.git
```
2017-02-08 18:55:57 +01:00
2. Install the **plugin** and **theme dependencies** by using the [Grav CLI application ](https://learn.getgrav.org/advanced/grav-cli ) `bin/grav` :
2014-08-13 00:52:47 +02:00
```
$ cd ~/webroot/grav
$ bin/grav install
```
2017-02-08 18:55:57 +01:00
Check out the [install procedures ](https://learn.getgrav.org/basics/installation ) for more information.
2014-08-13 00:52:47 +02:00
2014-12-05 19:33:30 +01:00
# Adding Functionality
2017-02-08 18:55:57 +01: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 19:33:30 +01:00
```
$ bin/gpm index
```
2015-10-28 09:55:23 +01:00
This will display all the available plugins and then you can install one or more with:
2014-12-05 19:33:30 +01:00
```
$ bin/gpm install < plugin / theme >
```
# Updating
2017-02-08 18:55:57 +01:00
To update Grav you should use the [Grav Package Manager ](https://learn.getgrav.org/advanced/grav-gpm ) or `GPM` :
2014-12-05 19:33:30 +01:00
```
$ bin/gpm selfupgrade
```
To update plugins and themes:
```
$ bin/gpm update
```
2021-01-19 10:27:14 +01: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 19:49:54 +02:00
2014-08-15 22:26:02 +02: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 22:26:02 +02:00
2017-06-15 16:04:08 +02:00
## Security issues
2017-11-02 00:21:14 +01: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 22:26:02 +02:00
2014-08-13 21:13:14 +02:00
# Getting Started
2017-02-08 18:55:57 +01: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-16 00:30:44 +01:00
* If you have questions, jump on our [Discord Chat Server ](https://chat.getgrav.org )!
2014-08-11 20:01:11 +02:00
* Have fun!
2014-08-11 19:49:54 +02:00
2016-01-10 19:22:23 +01:00
# Exploring More
2014-08-13 21:13:14 +02:00
2017-02-08 18:55:57 +01: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 00:21:14 +01: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-22 03:06:12 +01:00
* More [Awesome Grav Stuff ](https://github.com/getgrav/awesome-grav )
2014-08-11 19:49:54 +02:00
2017-01-30 20:47:09 +01:00
# Backers
2017-11-02 00:21:14 +01:00
Support Grav with a monthly donation to help us continue development. [[Become a backer ](https://opencollective.com/grav#backer )]
2017-01-30 20:47:09 +01:00
2018-11-14 08:05:18 +01:00
< img src = "https://opencollective.com/grav/tiers/backers.svg?avatarHeight=36&width=600" / >
2017-01-30 20:47:09 +01:00
# Sponsors
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor ](https://opencollective.com/grav#sponsor )]
2017-02-16 00:14:51 +01:00
2018-11-14 08:05:18 +01:00
< img src = "https://opencollective.com/grav/tiers/sponsors.svg?avatarHeight=36&width=600" / >
2017-01-30 20:47:09 +01:00
2014-08-13 21:13:14 +02:00
# License
2015-12-06 22:24:27 +01:00
See [LICENSE ](LICENSE.txt )
2014-08-15 22:26:02 +02:00
[gitflow-model]: http://nvie.com/posts/a-successful-git-branching-model/
2014-08-15 22:31:49 +02:00
[gitflow-extensions]: https://github.com/nvie/gitflow
2016-01-10 19:22:23 +01:00
# Running Tests
2021-01-19 10:27:14 +01:00
First install the dev dependencies by running `composer install` from the Grav root.
2018-11-16 00:29:08 +01: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 10:27:14 +01: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