I'm doing some server configuration related tasks and was looking for a way to configure the theme of a store/website via the command-line.
I'm setting up a store with a custom theme (e.g. "Vendor/code
") and I would like to activate it without entering the adminhtml website but set the theme on the command-line / in the shell / bash script.
Best Answer
I was not able to find a direct Magento CLI command so far, I could work around with a Bash and Magerun:
This sequence sets the configuration path for the theme_id to the one of the named theme (by it's code, which is "
Vendor/code
" in the example).In case the operation fails, this has a non-zero status.