Grav Content
- Grav - Multi Language
- Grav - Modular Pages
- Grav - Media
- Grav - Image Linking
- Grav - Page Linking
- Grav - Markdown Syntax
- Grav - Pages
Grav Themes
- Grav - Theme Customization
- Grav - Asset Manager
- Grav - Theme Variables
- Grav - Twig Filters & Functions
- Grav - Theme Tutorial
- Grav - Themes Basics
Grav Plugins
Grav Administration Panel
- Grav - Page Editor Advanced
- Grav - Page Editor Options
- Grav - Administration Panel Pages
- Grav - Configuration Site
- Grav - Configuration System
- Grav - Admin Dashboard
- Grav - Admin Introduction
Grav Advanced
- Grav - Forms
- Grav - YAML Syntax
- Grav - Lifecycle
- Grav - Development
- Grav - GPM
- Grav - CLI
- Grav - Debugging & Logging
- Grav - Performance & Caching
- Grav - Blueprints
Grav Hosting
Grav Troubleshooting
Grav Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Grav - GPM
GPM stands for Grav Package Manager which is used to install, update, un install and pst the available plugins on the Grav repository. GPM executes the commands using command pne interface such as terminal or cmd.
You can access CLI very easily. On Windows, you can access through cmd, on Mac you can access through Terminal and on Linux you can use shell. In windows, you can t use UNIX style commands. To use these just install the
package which provides GIT and GIT BASH and provides UNIX style commands on Windows.To pst the available commands on the Grav repository type the command as −
$ bin/gpm pst
You will receive the following −
You can help the commands by adding help to the pne as shown below −
$ bin/gpm help install
You can find the version of PHP on the command pne interface by using the following command −
$ php -v
How Does it work?
When you run the commands on the command pne interface, GPM automatically downloads the required data from the GetGrav.org site. It includes all the details of available packages and also determines the packages that need to be installed and which packages needs to be updated.
When you are downloading the packages from the repository, the Grav repository gets cached locally and no request will be able to contact the GetGrav.org server after the cache has been generated.
Some commands come with the --force (-f) option, which forces to re-fetch the repository. Using this option, there is no need to wait for 24 hours cycle before cache gets cleared.
Commands
You can download the available packages from the Grav repository using some commands. To make use of the command, open your terminal and navigate to your root of the Grav folder and type as bin/gpm <command>.
Index
The index command is used to pst the available plugins, themes in the Grav repository. Use the below command in your terminal to pst out the available resources.
$ bin/gpm index
Each pne defines the name of the plugin or theme, slug, version of plugin or theme and also displays whether it is installed or not.
Info
The info command is used to display the information about package such as author, version, date and time of last updated, repository of package, download pnk of package, pcense information etc.
Install
As the name imppes the install command installs the required resources for the package from the Grav repository.
You can use the following command to install the required package.
$ bin/gpm install package_name
If you try to install an already installed package, then it informs what to do next.
If you type Y, it will overwrite on an already installed package and if you type N, it will abort the installation process.
Update
The update command informs about the package that need to be updated. Suppose if all packages are up to date, then it will say nothing to update.
$ bin/gpm update
Self-upgrade
The self-upgrade command is used to upgrade the Grav to the latest version. Use the following command to upgrade the Grav.
$ bin/gpm self-upgrade
If you are using the latest version of Grav, then it will display a message saying "You are already running the latest version of Grav" along with the date of release and the time as shown in the screen.
Advertisements