How To Create Theme In Magento 2.0

Feb 4, 2016 6:54:48 PM

Magento is undoubtedly one of the better web commerce portals available to the world. The key to Magento’s success is through the extreme ease of customizability and management that even tech novices can easily master.

It has not been long since Magento 2.0 was launched. As the world delves into unraveling the vast expanse of features in the 2.0 release let me quickly run you through a neat set of steps that will help you in creating themes in Magento 2.0

Step 1

Go to:
<magento root folder>/app/design/frontend

Step 2

Create a new directory named your vendor name:

Step 3

Under the vendor directory, create a directory to name your theme.
Here: “Daffodil” is vendor name and “daffodil” is theme name

step 3

Step 4

Add theme.xml to your theme folder:

It should contain, at least, the theme name and the parent theme name (if theme inherits any other theme). Optionally you can specify where the theme preview image is stored.

Step 5


[php]<theme xmlns:xsi=""


<title>Daffodil theme</title> <!-- your theme's name -->

<parent>Magento/blank</parent> <!-- the parent theme, in case your theme inherits from an

existing theme -->


<preview_image>media/preview.jpg</preview_image> <!-- the path to your theme's preview

image -->



Step 6

If you want to distribute your theme as a package, add a composer.json file to the theme directory:


"name": "daffodil/theme-frontend-daffodil",

"description": "N/A",

"require": {

"php": "~5.5.0|~5.6.0|~7.0.0",

"magento/theme-frontend-blank": "100.0.*",

"magento/framework": "100.0.*"


"type": "magento2-theme",

"version": "100.0.1",

"license": [




"autoload": {

"files": [





Step 7

To register your theme in the system, go to your theme directory and add a registration.php file with the following content:



* Copyright © 2015 Magento. All rights reserved.

* See COPYING.txt for license details.







Step 8

Your theme is now created which you can check under Admin. For this go to Content -> Design -> Themes. Make sure your theme appears in the theme list.

Step 8

Step 9

Go to Stores -> Configuration -> Design.

Step 10

In the Scope drop-down field, select the store view where you want to apply the theme.

Step 11

On the Design Theme tab, select your newly created theme in the Design Theme drop-down

Step 11

Step 12

Click Save Config.

Cheers! You have created your very own theme in Magento 2.0!
Easy, isn’t it? There are tons of new features that we have been playing around with Magento 2.0 since its release while delivering projects for our clients.

Get in touch with us if you have a Magento idea in mind or wish to inquire more about Magento 2.0. For more of such posts around the latest technologies that drive the world, sub to the blog and we will keep you updated.

Topics: CMS & Ecommerce

Team Daffodil

Written by Team Daffodil

We equip smart companies with smarter solutions. Our all-round expertise in Web, Mobile and Cloud solutions has brought about a change in some of the top businesses, setting global milestones as we go.