diff --git a/plugins/CoreConsole/Commands/GeneratePlugin.php b/plugins/CoreConsole/Commands/GeneratePlugin.php
index bf83889305e793d3be703a210b3900d044dda4e2..45fa111d87ab852105f93ffeffcef2687f7a250e 100644
--- a/plugins/CoreConsole/Commands/GeneratePlugin.php
+++ b/plugins/CoreConsole/Commands/GeneratePlugin.php
@@ -126,6 +126,10 @@ class GeneratePlugin extends GeneratePluginBase
                 throw new \RuntimeException('You have to enter a plugin name');
             }
 
+            if(strlen($pluginName) > 40) {
+                throw new \RuntimeException('Your plugin name cannot be longer than 40 characters');
+            }
+
             if (!Plugin\Manager::getInstance()->isValidPluginName($pluginName)) {
                 throw new \RuntimeException(sprintf('The plugin name %s is not valid. The name must start with a letter and is only allowed to contain numbers and letters.', $pluginName));
             }