K10rDeployment adds some helpful console commands for automatic deployments to Shopware 5.
composer require k10r/deployment
php bin/console sw:plugin:reinstall K10rDeployment
)engine/Shopware/Plugins/Local/Core/
folder.php bin/console sw:plugin:reinstall K10rDeployment
)Compiles the theme for all shops.
php bin/console k10r:theme:compile
Deactivates a given plugin.
php bin/console k10r:plugin:deactivate <pluginName>
Installs a plugin and updates it, if necessary. This command does not fail, if the plugin is already installed (the default sw:plugin:install
command fails).
php bin/console k10r:plugin:install [--activate] <pluginName>
Use the optional --activate
option to activate the plugin after the installation.
Updates the settings of a subshop
php bin/console k10r:store:update [--store 1] [--name <NewShopName] [--host new.example.com] [--path /staging] [--title "DEV! Shop"] [--theme MyAwesomeTheme]
store
: Shop ID of settings to be set, if not set, default-shop will be usedname
: Sets the name of a shophost
: Sets the hostname of a shoppath
: Sets the path of the shop relativ to the hostname (e.g. new.example.com/staging)title
: Sets the title of the shoptheme
: Sets the theme of the shop, based on the given template namesecure
: Activate SSL on the shopphp bin/console k10r:theme:update --theme MyAweSomeTheme [--shop 1] --setting "text-color" --value "#FF0000"
theme
: Name of the theme for settings to be setshop
: Shop ID of settings to be set, if not set, default-shop will be usedsetting
: Name of the setting to be setvalue
: Value to be setVerifies if an update is needed for the application to be on a requested version. Return code 0 means an update is needed.
php bin/console k10r:update:needed <targetVersion>
php bin/console k10r:config:set [--shop 1] "noaccountdisable" "true"
shop
: Shop ID of settings to be set, if not set, default-shop will be usedkey
: Name of the configuration element to be setvalue
: Value to be setRetrieves the plugin configuration and display it inside the console.
php bin/console k10r:config:get pluginName
pluginName
: Name of the plugin$ ./bin/console k10r:config:get PluginName
+---------------------+-----------------+------------+---------------+
| Config Eement | Shop ID: 1 | Shop ID: 2 | Default Value |
+---------------------+-----------------+------------+---------------+
| Element Name | Value | | |
| Other Element | Other Value | | |
+---------------------+-----------------+------------+---------------+
Clear specific caches like in backend performance modul
php bin/console k10r:clear:cache --all
php bin/console k10r:clear:cache --frontend
php bin/console k10r:clear:cache --config --template
all
: All cachesfrontend
: All frontend related cachesbackend
: All backend related cachesconfig
: Shopware configuration cachetemplate
: Template cachetheme
: Theme cachehttp
: HTTP cacheproxy
: Doctrine Annotations and Proxiessearch
: Search cacherouter
: SEO URL indexMIT licensed, see LICENSE.md