{"record":{"id":"5d30761e17a631de","repo":"getgrav/grav","slug":"plugin-this-pluginname-is-not-installed","errorCode":null,"errorMessage":"Plugin \"{$this->pluginName}\" is not installed.","messagePattern":"Plugin \"(.+?)\" is not installed\\.","errorType":"console","errorClass":"NamespaceNotFoundException","httpStatus":null,"severity":"error","filePath":"system/src/Grav/Console/Application/PluginApplication.php","lineNumber":108,"sourceCode":"        }\n\n        parent::init();\n\n        if (null === $this->pluginName) {\n            $this->setDefaultCommand('plugins:list');\n\n            return;\n        }\n\n        $grav = Grav::instance();\n        $grav->initializeCli();\n\n        /** @var Plugins $plugins */\n        $plugins = $grav['plugins'];\n\n        $plugin = $this->pluginName ? $plugins::get($this->pluginName) : null;\n        if (null === $plugin) {\n            throw new NamespaceNotFoundException(\"Plugin \\\"{$this->pluginName}\\\" is not installed.\");\n        }\n        if (!$plugin->enabled) {\n            throw new NamespaceNotFoundException(\"Plugin \\\"{$this->pluginName}\\\" is not enabled.\");\n        }\n\n        $this->setCommandLoader(new PluginCommandLoader($this->pluginName));\n    }\n}\n","sourceCodeStart":90,"sourceCodeEnd":117,"githubUrl":"https://github.com/getgrav/grav/blob/6040efed04efa69b8209448ed81308e7c24147c2/system/src/Grav/Console/Application/PluginApplication.php#L90-L117","documentation":"Thrown by Grav's PluginApplication before any plugin command runs: `bin/plugin <slug> ...` looks the slug up in the global Plugins registry via Plugins::get(), and if no plugin object is registered under that name it fails with this NamespaceNotFoundException. It means Grav's plugin initialization never produced a plugin for that slug — effectively 'unknown plugin' at the CLI level.","triggerScenarios":"Running `bin/plugin errorslug command` with a typo in the plugin slug; the plugin was never installed (no user/plugins/<slug>/ directory); the directory exists but the plugin class file <slug>.php or <slug>Plugin.php fails to load (fatal parse error), so it never gets registered; or the folder name does not match the plugin slug Grav expects.","commonSituations":"Fresh clone or migration where user/plugins content was not carried over; plugin manually copied under a different folder name (e.g. grav-plugin-forms instead of forms); plugin installed via composer but into vendor instead of user/plugins; PHP version incompatibility silently preventing the plugin class from loading during initializeCli().","solutions":["Confirm the plugin exists and is recognized: run `bin/gpm info <slug>` and check user/plugins/<slug>/ exists with its blueprints and main plugin PHP file.","If missing, install it: `bin/gpm install <slug>` (or unzip the plugin so the folder is user/plugins/<slug>).","Fix the folder/file naming: the directory name must equal the plugin slug and contain <slug>.php defining class Grav\\Plugin\\<Slug>Plugin.","Check for load errors: run `bin/grav clearcache` and look at web-server/CLI logs for PHP fatals in the plugin's files that would prevent registration."],"exampleFix":"# before\n$ bin/plugin formms clear-cache  # typo -> Plugin \"formms\" is not installed.\n\n# after\n$ bin/gpm info form   # confirm real slug\n$ bin/plugin form clear-cache","handlingStrategy":"validation","validationCode":"$slug = 'form';\nif (!is_dir('user/plugins/' . $slug)) {\n    fwrite(STDERR, \"Plugin {$slug} is not installed. Run: bin/gpm install {$slug}\" . PHP_EOL);\n    exit(1);\n}\n// then: popen('bin/plugin ' . escapeshellarg($slug) . ' ...', 'r')","typeGuard":null,"tryCatchPattern":"try {\n    $app->run();\n} catch (\\Symfony\\Component\\Console\\Exception\\NamespaceNotFoundException $e) {\n    // message names the plugin; surface install hint\n    fwrite(STDERR, $e->getMessage() . PHP_EOL . \"Install with: bin/gpm install <slug>\" . PHP_EOL);\n    exit(1);\n}","preventionTips":["Resolve plugin slugs from user/plugins/ directory listing rather than trusting input strings.","Run `bin/gpm info <slug>` in provisioning scripts before invoking plugin CLI commands.","Keep plugin folder names identical to their GPM slugs."],"tags":["grav","cli","plugin","plugin-not-found"],"backgroundTag":"plugin-not-found","analyzedSha":"6040efed04efa69b8209448ed81308e7c24147c2","analyzedAt":"2026-08-17T05:07:31.593Z","schemaVersion":2},"datasetVersion":"2026-08-17T09:17:11.063Z"}