Home » Magento17 May 2011

Magento: How to create extension package? [IMAGES]

You have built a custom magento extension (magento module) and you want to package it and submit it to magento connect (magento extension directory).

This article shows how to create Magento extension package. I have included images for every step which I followed while creating extension package for my module (Auto Currency Switcher).

Auto Currency Switcher is a currency switcher extension which automatically switches store currency based on visitor’s IP address. It is a FREE extension.

Lets move on with the step-by-step guide for packaging Magento extension.

Login to admin and go to System -> Magento Connect -> Package Extensions

1. Package Info

Name: YourNamespace_YourModuleName

Channel: connect.magentocommerce.com/community (If you are using Magento version 1.4 and below)
Channel: community (If you are using Magento version 1.5 and above)

Supported releases: Pre- (Extension will be installed in all versions of Magento)
Supported releases: & later (Extension will only support 1.5 and higher versions of Magento)

package info

2. Release Info

Release Version: Your module’s version as present in YourNamespace/YourModule/etc/config.xml

release info

3. Authors

Your name, email and Magento Commerce username.


4. Dependencies

I just added minimum and maximum PHP Version. I didn’t do any changes in Packages and Extensions fields.


5. Contents

The Path is relative to Target directory.

Magento Local module file is relative to app/code/local/
Magento Community module file is relative to app/code/community/
Magento Core team module file is relative to app/code/core/
Magento User Interface (layouts, templates) is relative to app/design/
Magento Global Configuration is relative to app/etc/
Magento PHP Library file is relative to lib/
Magento Locale language file is relative to app/locale/
Magento Media library is relative to media/
Magento Theme Skin (Images, CSS, JS) is relative to skin/
Magento Other web accessible file is relative to /
Magento PHPUnit test is relative to tests/
Magento other is relative to /

You can see this path-target relationship in your magento installation file as well. It is located in downloader/target.xml file of your Magento root.

In my case, I have used the following:

Target | Path | Type
Magento Community module file | Chapagain/AutoCurrency | Recursive Dir
Magento Global Configuration | modules/Chapagain_AutoCurrency.xml | File
Magento other | var/geoip | Recursive Dir


Save Data and Create Package after you fill up all these fields.

You have finally packaged your Magento extension. The package file is located at var/pear OR var/connect directory.

More more information on packaging extension in Magento:-

Packaging a Magento Extension

Packaging a Magento Extension in 1.5+

Hope this helps.


Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed
  • Guest


    Great Post.I created a theme package as per your tutorial.Magento created package file under var/pear/.When i extract it has only one file package.xml and an empty folder.btw,Do i have to create any config file for packaging any theme?

  • I tried to create a package with app/design and skin folder. It worked fine and I could see other folder and files in the package file inside var/pear.

    I tested with default theme and default skin. In ‘Contents’ section, I kept like this:-Target: Magento Theme SkinPath: frontend/default/defaultType: Recursive DirTarget: Magento User InterfacePath: frontend/default/defaultType: Recursive Dir

  • ZoneP

    Hi Mukesh, 

    Thanks for this great tutorial. I have one question for you. 

    I am have packaged a module and defined it for pre 1.5, when I install it on previous versions (1.4.x) via Magento connect, it automatically triggers Magento upgrade which is rather odd. 

    Any ideas please?

  • Holla

    First mini-tutorial that works! Thanks!

  • agam garg

    Hello all,

    I am running a e-store and i am stuck in a problem so i need ur help pls….

    i want to remove plus  (+) sign from custom dropdown options on product page . please give me a solution to do this 

    please reply me on akg1989.garg @gmail.com your help would be appreciated

  • Gabriela

    Hi, Mukesh
    Do you know whether the package file can be tested before uploading to Magento Connect?
    Thanks for the tutorial, it´s pretty straightforward and easy to folloow.

  • Anonymous

    Hi Gabriela,

    you can test it by manually uploading the tar.gz in Magento Connect inside your Magento instance.



  • Anonymous

    Hi Mukesh,

    thanks a lot for this blog post. Especially the mapping of labels to actual paths is very useful as a cheatsheet.

    Just a hint: Don’t set the “Release Stability” to “Development”, because then it will not be approved on Magento Connect.



  • Zubair Ahmed112

    Very nice tutorial for creating packages of newly created modules. Thanks keep up the good work.


  • Sankar Kethineni

    Hi Mukesh, you have done a gud job. Am trying to include a file from a folder as shown below but i could not see that file in the package file inside var/pear.

    Target: Magento User Interface
    Path: frontend/default/default
    Type: File
    Include: sample.phtml ( and if i have to include more than 1 files from a folder, what should i do)

    Please correct me if i have done any thing wrong here. Thanks in advance :)

  • Atti Rehman

    Here is a scenerio, on my products page I want to add an
    image of the product dimensions but for this image I want to use
    thumbnail which is different from the actual image which will say
    Dimensions. This will be applied to all the products across the store.
    So there will be one thumnail image for all the products that will be
    associated with it’s dimensional image. I want to show it on the gallery
    page as last image.
    Any help would be greatly appreciated.


  • Tejdeep

    Hey, this was really very helpful i was successfully able to submit my extension.
    Now im looking to submit the same extension for Magento go …can you please help me with that.

  • Ashar Khan

    Perfect example for extension creation with screen-shot and explanations.
    Thanks :)

  • MacPain

    That was very very helpful. Big THX for this :)

  • Have been looking for some help and found this page. Great explanation, very clear! You saved me a lot of time. Thank a lot!!!

  • Guy Chauhan

    i want to use include/ignore on media folder for my extension when i package it because i don’t want to include all the images created in new package. how can i do that? what should be the regular expression for that.?

  • Ankit Jaiswal

    Can you Share the exact location of tag.gz in Magento Connect I am unable to get the location

  • Ankit Jaiswal

    Can you Share the exact location of tag.gz to upload in Magento Connect I am unable to

  • Muhammad Ahsan Horani

    How can I force extension to overwrite files if already exist in the code directory ?

    Hoping for a positive response.