Packaging a Magento Extension in 1.5+

Last modified by fuelairspark on Fri, August 26, 2011 03:35
Source|Old Revisions  

This is an old revision of the document!

Packaging a Magento extension in CE 1.5+ has changed due to the creation of Magento Connect 2.0 – this document reflects those changes. If you have questions, please refer to the Magento Connect forum for further guidance.

IMPORTANT UPDATE: Please make sure you read the section on Broader Extension Support before uploading your extensions.

This admin page will help to package your extensions, such as modules, add-ons, language packs, interfaces and themes, into CONNECT packages which you could upload to MagentoConnect and share with other community members.

For starting on extension packaging process, log in to Magento Admin panel and go to :

Admin Panel: » System » Magento Connect » Package Extensions

You can easily follow the 5 step process there to generate the extension that are described in the remaining article.

The extension packaging process includes generation of package.xml file with information about the package collected by the 5 steps below, and archiving content files and folders specified by the Contents step.

After package release is uploaded to MagentoConnect, it will be available for download and installation for other members, by pasting extension key into MagentoConnect downloader.

Packaging an extension

Is divided into 5 steps, detailed below.

After all steps have been completed, you can click “Save” button to save package for future retrieval by clicking “Load” button.

You can generate the release package by clicking on “Save data and Create Package” button. This will validate your information and create a .tar.gz file in var/connect (if you select & later) or var/pear (if you select Pre- that you can upload to MagentoConnect. See Broader Extension Support below for further details on the differences.

NOTES: Please be aware of the following guidelines when packaging an extension. These are important and if entered wrong in packaging, could give you problems when uploading.

  • Extensions are case sensitive: Make sure the package name reflects accordingly in all folders and xml files. e.g. MyExtension is not same as Myextension.
  • Do not put spaces in the package name: The package name must NOT have space inside. For example, use Foo_Bar, don’t use “Foo Bar”. You will have ”There was a problem saving package data” when you save the extension if there is space inside the module name.
  • ZLIB Requirements: Make sure you have zlib enabled in your php cli. Typically it is under “/usr/local/bin/php”. Otherwise you won’t be able to generate the package.

1. Package Info

Here is general information about package without regards to releases or versions

  • Name: CONNECT short package name, ( MyExtension )
  • Channel: For community packages use (community) *This is case sensitive*
  • Summary: Short package definition
  • Description: Extended package definition
  • License: Extension license name (OSL v3.0)
  • License URI: Web URL for license text (

2. Release Info

In this tab provide release/version specific information

  • Release Version: Major, minor, revision and stability for the release (1.1.20123)
  • API Version: Major and minor version for API used in this release (1.0)
  • Release Stability: Stability of this release (alpha)
  • API Stability: Stability of the API used in this release (stable)
  • Notes: Release notes for users and developers

3. Authors (required)

Authors of the package, user names the same as in MagentoConnect Only LEAD authors can upload releases The User field is your user name (found under My Account, User Name and Password). Don’t use your screen name here.

4. Dependencies

PHP Version

An example setup for PHP5 >= 5.2.0:

  • Minimum: 5.2.0
  • Maximum: 6.0.0


Dependencies for current package

  • Package: short package name (Mage_Core_Modules)
  • Channel: community or core
  • Min: minimum supported version of dependent package
  • Max: maximum supported version of dependent package


PHP/PECL extensions dependencies

  • Extension: select the type of extension
  • Min: minimum supported version of extension
  • Max: maximum supported version of extension

5. Contents (required)

  • Target: Location of the files to include
  • Path: Path within the target (location). The path is relative to role directory. ex: Magento Community Module file is relative to app/code/community/ ; Magento Global Configuration is relative to app/etc/ ...
  • Type: File or Recursive Directory
  • Include: Regular expression for file pattern to include (requires pattern delimiter, like ‘#’) - ex. #^Mage#
  • Ignore: Regular expression for file pattern to ignore (requires pattern delimiter, like ‘#’)