---
title: "How to Create your Own Custom Theme in Magento 2?"
url: "https://magecomp.com/blog/create-custom-theme-magento-2/"
date: "2018-07-16T16:19:33+00:00"
modified: "2025-06-02T13:08:25+00:00"
author:
  name: "Dhiren Vasoya"
  url: "https://magecomp.com/"
categories:
  - "How To"
  - "Magento 2"
word_count: 390
reading_time: "2 min read"
summary: "In this digital era, styling your store with some lovely look and feel elements helps you to deliver a great user experience and let your store customer enjoy the whole shopping process until they ..."
description: "In this digital era, styling your store with some lovely look and feel elements helps you to deliver great user experience and increase store conversions. So..."
keywords: "How To, Magento 2"
language: "en"
schema_type: "Article"
related_posts:
  - title: "How to Perform Operation When Any New Product is Created in Magento 2"
    url: "https://magecomp.com/blog/perform-operation-product-magento-2/"
  - title: "How to Apply Admin Theme in Magento 2?"
    url: "https://magecomp.com/blog/apply-admin-theme-magento-2/"
  - title: "How To Disable System Configuration Field Programmatically in Magento 2"
    url: "https://magecomp.com/blog/disable-system-configuration-field-programmatically-magento-2/"
---

# How to Create your Own Custom Theme in Magento 2?

_Published: July 16, 2018_  
_Author: Dhiren Vasoya_  

![How to Create your Own Custom Theme in Magento 2](https://magecomp.com/blog/wp-content/uploads/2018/07/How-to-Create-your-Own-Custom-Theme-in-Magento-2-1024x332.webp)

In this digital era, styling your store with some lovely look and feel elements helps you to deliver a great user experience and let your store customer enjoy the whole shopping process until they get products hands on. Even if your store doesn’t have responsive web layout you will not only lose your traffic and conversions, but even search engine page rankings according to search engine update pushed by Google. So, don’t you think it’s time to tune your store? Either by adding new elements or changing your current theme.

Basically, the theme is a component of Magento which provides a stunning look and feel to your entire Magento store. Which is simply a combination of custom templates, layouts, styles or media. But “How to create a theme in Magento 2?” asked by one of our readers. That’s why here is the post open for all, to learn how to create your own theme in Magento 2.

[![Magento Malware Removal](https://magecomp.com/blog/wp-content/uploads/2025/02/Magento-Malware-Removal-CTA-5.webp)](https://magecomp.com/magento-malware-removal.html)

To create a Theme, first you need to declare it by creating a **theme.xml** file in the following path. In this file you have to set title for the theme and need to define parent tag if you are willing to inherit another theme.

**Step 1:** First, we need to create **“theme.xml”** file inside extension the below directory

**app\design\frontend\Themes\yourtheme**

```
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>Themes yourtheme</title>
    <parent>Magento/blank</parent>
    <media>
        <preview_image>media/preview.jpg</preview_image>
    </media>
</theme>
```

**Step 2:** after that, you need to create **“registration.php”** file inside extension the below directory

**app\design\frontend\Themes\yourtheme**

```
<?php
MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::THEME,
'frontendThemesyourtheme',
__DIR__
);
```

[![Magento 2 Speed & Performance Optimization Services](https://magecomp.com/blog/wp-content/uploads/2025/02/Magento-2-Speed-Performance-Optimization-Services-CTA-2.webp)](https://magecomp.com/magento-performance-optimization.html)

**Step 3:** lastly, you need to create **“composer.json”** file inside extension the below directory

**app\design\frontend\Themes\yourtheme**

```
{
    "name": "themes/yourtheme",
    "description": "Magento 2 Your theme",
    "require": {
        "php":         "~5.5.0||~5.6.0||~7.0.0||~7.1.0||~7.2.0||~7.3.0||~7.4.0||~8.1.0||~8.2.0||~8.3.0",
        "magento/theme-frontend-blank": "100.0.*",
        "magento/framework": "100.0.*"
    },
    "type": "magento2-theme",
    "version": "100.0.1",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "autoload": {
        "files": [
            "registration.php"
        ]
    }
}
```

Simply play & with these codes according to your need of creating your own theme in Magento 2. Don’t forget to tell us which theme you have created in your Magento 2 by commenting down below.

[![hyva theme development](https://magecomp.com/blog/wp-content/uploads/2025/02/hyva-theme-development-CTA-3.webp)](https://magecomp.com/services/hyva-theme-development/)
Happy Coding!


---

_View the original post at: [https://magecomp.com/blog/create-custom-theme-magento-2/](https://magecomp.com/blog/create-custom-theme-magento-2/)_  
_Served as markdown by [Third Audience](https://github.com/third-audience) v3.5.3_  
_Generated: 2026-09-05 03:44:14 UTC_  
