Tutorial Details
- Technology: Magento
- Difficulty: Beginner - Intermediate
Magento is a stunningly powerful e-commerce platform. In celebration of ThemeForest’s new Magento category, this mini-series will you teach how to get started with the platform, getting to know the terminologies, setting up a store and all related aspects of it, and finally how to customize it to make it our very own.
In this first part, we’ll get to know what Magento is, installing it, and importing some products. This is aimed expressly at the beginner; so you need not worry about lacking the requisite skills. We’ll walk you right through! Excited? Let’s get started!
The Full Series
- Part 1: Installation and Setup
- Part 2: Products, Taxes, Categories, Payment Gateways, etc.
- Part 3: Theming
- Part 4: Building the Theme
- Part 5: Building the Product Information Page
What exactly is Magento?
Running an e-commerce site is a daunting task what with almost all of the current platforms being lumbering beasts ill-suited to current standards. Magento promises to fix this and a lot more.
Magento is an extremely powerful and feature filled e-commerce platform. And it’s open source to boot! It comes filled to the brim with all the features and tools you’d need to get your e-commerce web site up and running as quickly as possible.
What Features Do You Get?

Magento is replete with a number of features which are hard to find or maybe even unheard of in most of its competitors. Salient ones include:
Flexible Payments
Often used payment processors including Paypal, Google Checkout, USAePay and Authorize.net are supported along with support for traditional methods such as credit cards, money orders and checks. Plenty of modules are also available to make it works with a myriad other payment processors.
Robust Checkout Process
All the features you’d expect out of a mature product including 1-click checkout and full SSL support are present.
Full Fledged Analytics
Magento provides complete analytics and reports for your stores. No need to use a third party solution anymore!
Product Reviews and Ratings
Out of the box, you can setup the store so that a customer can rate an item up or down and leave a review.
Search Engine Optimized
Magento is 100% Google friendly and supports Google Site maps to boot.
Marketing Promotions
A number of different promotional options including coupons and discounts can be made use of right off the bat.
And many, many more
There are truly too many features to cover in a single article. To be frank, you’d need an entire book to cover what Magento can do. Magento almost has every facet covered.
Which Version to Choose?

Now that you’re excited about Magento, you probably can’t wait to get started. But before that, we need to choose which version to pick.
Magento comes in two flavors:
The Enterprise edition is for organizations running mission critical stores. It comes with 24/7 support and numerous features you’d expect out of an en enterprise level platform including a more robust CMS system, support for gift certificates and more. But on the flip side it weighs in at $11,125 per year.
The Community version meanwhile is completely free to download and use and you’re at complete liberty to modify it to suit your needs. The only thing you’d be giving up will be the robust support but the active community more than makes up for it.
We’ll be taking a look at the community edition today.
Server Requirements
Magento has modest server requirements but it doesn’t hurt to make sure we have everything in order. Here are the official requirements:
- Apache 1.3+
- PHP 5.2+
- mySQl 4.1.2+
There are ways to make it work with PHP 4 but honestly, it’ll be easier in the long run to just upgrade your PHP installation.
Prepping for the Installation
First, you need to obtain a copy of Magento. If you’re a SVN person, checkout a copy from http://svn.magentocommerce.com/source/branches/1.4. Else, you can just it get it from here.

We also need a database for Magento so we’ll set it up as it downloads. I’m assuming you already have a LAMP setup in place.

On successful database creation:
I’m making a note here. Huge success!Importing the Sample Data
We’ll need to import some sample data to our newly created database before we install Magento.

First up, download the SQL for the data.

Import it through phpMyAdmin and let it do all the rest.

Installation
Now we can move on to the actual installation. Magento, being a mature platform, has a relatively simple installation process. All you need to do is input a few values, click on the continue button and you’ll be on your way to a working Magento installation.

First, up we need to accept the license agreement. It’s mostly boilerplate but give it a quick read. Finally accept the terms and click on the continue button.

Set up your location, preferred currency and time zone in the next screen. You can, of course, change all these later through the administration screens.

Like me, if you’re daft, you might have forgotten to enable some of the PHP extensions Magento needs. In that case, enable the extension Magento needs and then retry.

You can now input the database credentials Magento needs to set it all up. You can also adjust the base URL of the store and the path to the administrative panel.
You can also set up clean SEO URLs right off the bat here.

Finally, you need to setup your admin account so you can manage everything. Magento needs an encryption key for encrypting sensitive data. If you have one at hand, type it in. Else let Magento generate one for you.

And we’re done. Magento has been successfully been installed.
Fix for Local Test Servers
If you’ve tried logging on to your fresh installation, you’ll get errors asking you to enable your cookies. This is because browsers generally tend to not store cookies for URIs without a period in it. localhost thus fails to store a cookie which leads to problems logging in.
Solutions to this problem range from using 127.0.0.1/magento instead of localhost to modifying Windows’ host file to manually redirect it. Nonetheless, since this is only going to be the test setup, we can just bypass said cookie-check.
Open up Varien.php at magento\app\code\core\Mage\Core\Model\Session\Abstract and find the following snippet starting at line 77:
// session cookie params
$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath(),
'domain' => $cookie->getConfigDomain(),
'secure' => $cookie->isSecure(),
'httponly' => $cookie->getHttponly()
);
if (!$cookieParams['httponly']) {
unset($cookieParams['httponly']);
if (!$cookieParams['secure']) {
unset($cookieParams['secure']);
if (!$cookieParams['domain']) {
unset($cookieParams['domain']);
}
}
}
if (isset($cookieParams['domain'])) {
$cookieParams['domain'] = $cookie->getDomain();
}
Now comment out the relevant parts like so:
// session cookie params
$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath(),
'domain' => $cookie->getConfigDomain(),
'secure' => $cookie->isSecure(),
'httponly' => $cookie->getHttponly()
);
/* if (!$cookieParams['httponly']) {
unset($cookieParams['httponly']);
if (!$cookieParams['secure']) {
unset($cookieParams['secure']);
if (!$cookieParams['domain']) {
unset($cookieParams['domain']);
}
}
}
if (isset($cookieParams['domain'])) {
$cookieParams['domain'] = $cookie->getDomain();
}*/
Importing Custom Products
We’re all but done here. We’ve installed Magento and added some sample data to get a taste of the platform. But it’d be more useful if we could import some of our own products before leaving. For a few, manually importing them shouldn’t be a problem. But when they move into the tens, this should be a problem.
To that end, this simple technique should come in handy. There are, of course, more sophisticated ways to import data but they require a tad more Magento expertise so we’ll be tackling it later on in the series.
Step 1: Export the Sample Products


Step 2: Understand the way the CSV is Structured
Study the structure of the CSV. Once you’re understood it, you can easily just add products directly to the CSV file. Feed it into a spreadsheet program to make this part even more easier.
Step 3: Import the Updated CSV into Magento


The Last Word
And we are done! We looked at what Magento is, the features it offers, how to install it, how to get some sample data in and finally how to get our own product data in. If you think it was a little too beginner level, fret not. This first entry is aimed primarily at the designer who wants to get his/her feet wet with Magento. We’ll be ramping up the difficulty as the series moves forward.
Questions? Nice things to say? Criticisms? Hit the comments section and leave me a comment. Happy coding!
Purchase Magento Themes from ThemeForest
Did you know that your friendly neighborhood ThemeForest sells premium quality Magento themes? Whether you’re a skilled Magento developer looking to start profiting from your efforts, or a buyer, hoping to build your first eCommerce store, we’ve got you covered!



That was a good one for Magento beginners. Hope, it helps the folks out there.
Now we’re talking! I used to be a huge fan of Magento but I could never find decent docs on theming. I’m def keeping an eye on this series. I’m all in for the theming part of it.
Magento is always the number one! Great tut!
I found cool things about Magento here http://inchoo.net/category/ecommerce/magento/
thank you for the link.
More Magento Tutorials and Programming are present over here:-
http://blog.chapagain.com.np/category/magento/
This website is a great help for Magento developers !!
I want some tutorials for Magento theme development….any links??
Nice to see some Magento tuts coming out through envato, it ensures good quality.
Bit basic for my taste, but as you say its to help those getting started with Magento.
Looking forward to Part II
hmm… I was looking for something like this… Let’s see what Sidhart comes up with in his next article…
looking forward for it..
The themes are selling over at Themeforest for aroudn $80 so if anything thats tripled my interest in this particular area :)
Yes, finally! Thank you so much for making this Siddarth!
Thanks for reading. :)
Since this is only a mini series, I’ll be covering just the basics over the next 3 parts.
If I see positive enough responses to these, you can count on regular Magento coverage in the future.
Hey, don’t just give up, Magento resources are so hard to find and their forum if you ask a question none will answer to you, so please keep on with the series, this is very valuable for those who want to learn Magento for real.
I really like Magento cause it relies so much on PHP, but it’s so different code than any other PHP CMS platform. This is maximum from PHP as programming language and it’s a good thing to know how to work with.
The only downside that i found is the constant changes in new versions, most of the cases when upgrading to newer version you will get errors from a code that it’s bit different than your previous.
Thanks for the tutorial btw :)
Thats a quite good tutorial. Looking forward to see/read more on magento.
i would like to devlop a shopping online on magento commerce. Will u be able to help me . if interested call me 09895188999
What a great tutorial on how to………..”install” Magento.
In case you haven’t noticed, this is aimed at the beginners and this is only the first part of a *series*.
Thanks for reading.
PWN’D!!!!!!!!!!!!
Lol, some people don’t read all the TUT. Just the title. Tards
Yeah, but it’s a pretty lengthy and unnecessary process. Go for something like Shopping Cart from Interspire and it’s a simple 1 step process.
Very nice tutorial , will find some time to read up for sure :)
I hope you could start a similar series for OpenCart, though I really loved this!!!
OMG! You have no idea how much this series is gonna help me! I’ve been trying to use Magento for a long time, but I couldn’t figure it out! (dumb-me)
Looking forward to Part 2! :D
Magento is a perfect solution for an e-commerce CMS but I wonder why there CRM guys behave so rude that made promise myself not to use Magento ever. There is one more thing wrong with it, you can not install it on any hosting provider you want, even if it is Linux host with full support for PHP and MySQL. I wonder whether they have done something with those issues, other than these it is a wonderful e-commerce solution.
nice tutorial….. thank you….
Awesome finally some great tutorials coming up.
Thank you very much.
very nice tutorial thanks lot
This should be a good series. I’ve always been interested in Magento, but never tried it out. I look forward to the rest of the series.
After several months of analysis we abandoned magento as the platform for our soon to be re-launched ecomerce site.
We found that it was barely capable of running on a small EC2 instance with just a handful of people manually testing. When I simulated some trivial volumes… it completely bogged down.
Before you sink a LOT of time into magento, put it on the hardware you think you’ll be using, load it up with data and run your own performance tests.
Then go look at some of the other options out there. The Rails based platforms are highly flexible, powerful and easy to work.
I have to agree. I used magento for a while, and while the community edition version is free, you will sink a lot of time trying to get the front-end to do what you want. And you need to run it on a vps or dedicated server. And good luck trying to get support from magento using the community edition. Maybe things have changed, but Magento had a history of breaking things when upgrading to newer versions. I would only use magento if you really need the flexibility in configuring products.
Thank you for this tut, I’m looking for tutorial for switch from joomla-VM to Magento, hope this serial of tutorials will help.
Great but it would be better if these were screen casts :)
Wow, that was creepy! I opened the site with the intention of searching the term “Magento” to see if there is any tutorials on it, and BAM! It’s the first one on the main page?!
Pretty weird coincidence.
Great tutorial. Can’t wait for the next part!
Really looking forward to the series, Magneto certainly looks very powerful and can’t want to start modifying it :)
Wao!
This series will be cool.
Actually I was looking to learn Magento these days.
Awesome!
With “customize” you mean making templates from scratch right? Because that’s the only thing I will be interested in… I tried that once, and failed :P
I’m really looking forward to the concept of designing templates to this platform. I think it’s a great platform for eCommerce, but i haven’t used it, since i don’t have a clue how to get started with designing templates for it..
Right on, I am starting a magento project soon. I would definitely like to see a custom template from scratch too.
Nice Tut! But I heard Magento eat up a lot of resources and its slow!
I also think so. The site loads really slow when it’s not cached. However, when cached properly, it runs in normal speed. I think part of the reason why it’s slow and consumes resources is it needs to render the theme and run a lot of thing in backend.
It reads many xml files, reading too many tables from the database, It’s using EAV model and requires lots of joining tables and checking conditions, many PHP files but as Toni said it can be optimized to work as charm.
True, Magento is slow by default but there are lots of things that need to be done to optimize Magento properly and then it works like a charm, I just wrote about Magento’s speed issue today :)
Nice, I would like to learn more. Recently I had installed it to test it functionality. And I found that overall it is a great e-commerce platform. But due to its high license cost, we offered nop commerce based solution to our client. Nop commerce is also one of the best open source e-commerce platform you can rely on.
Right on time! Just dipping my toes into Magento, looking forward to the next installment.
“installment”… get it? because all we learn to do is install it?
Here’s how I install Magento via SSH
I have time tested this to have an entire Magento site, with sample data, running in 8.5 minutes!:
wget http://www.magentocommerce.com/downloads/assets/1.3.2.4/magento-1.3.2.4.tar.gz
wget http://www.magentocommerce.com/downloads/assets/1.2.0/magento-sample-data-1.2.0.tar.gz
tar -zxvf magento-1.3.2.4.tar.gz
tar -zxvf magento-sample-data-1.2.0.tar.gz
mv magento-sample-data-1.2.0/media/* magento/media/
mv magento-sample-data-1.2.0/magento_sample_data_for_1.2.0.sql magento/data.sql
mv magento/* magento/.htaccess .
chmod o+w var var/.htaccess app/etc
chmod -R o+w media
mysql -h localhost -u bob -pletmein magento < data.sql
./pear mage-setup .
./pear install magento-core/Mage_All_Latest-stable
rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*
rm -rf magento/ magento-sample-data-1.2.0/
rm -rf magento-1.3.2.4.tar.gz magento-sample-data-1.2.0.tar.gz data.sql
- Exactly like that (no space between -p and the password by the way)
Hi Siddharth – This is a great tutorial – I don’t know anything about Magento but have wanted to for a while, so this is perfect. Just a quick question – is the Apache definitely needed? This might be a silly question, but my server is hosted on a windows server and I can’t install Apache as it’s only available on Linux servers. I can upgrade to a dedicated server, but this is much more expensive. Thanks.
I’ll try to answer your question.
apache used for webserver. if you hosted on windows server that using IIS, you just need PHP and MySQL.
for detail information, you can contact your administrator.
regards
Thanks Ridwan. I’ve been in contact with my web hosts over this, and they’ve been brilliant in helping me
Great! I was very pleased when I spotted this article! Just what I was waiting for.
Currently I’m playing with PrestaShop because I couldn’t get Magento working… But now I will follow your articles to get it under my skin. Anyway, it looks better than PrestaShop and OpenCart.
Looking forward to following Magento articles!
Nice tut but an earlier tut (http://net.tutsplus.com/articles/news/easy-e-commerce-with-magento/) covers pretty much everything you do in this tut. It would have been nice if you linked that tut and maybe started from where he left off or something.
What I’m saying is less redundant content plz.
Look’s like we’re on the same page!
Agreed. Most Designers aren’t that into installing and configuring it. While that stuff is good to know, maybe it shouldn’t be in a Magento for designers series. I want to know tips and details that will make skinning and themeing it better, faster, stronger. I am glad this series is here though, I have noticed the Magento site says next to nothing about designing. There’s one article that briefs you on the framework, but no detail. Looking forward to the next article though, Thanks!
Yeah, I agree that *LATER* articles could be useful.
Point is, THIS exact article has been written 3 times.
Oh, this is awesome! Now I can install a 3rd copy of Magento from what i’ve learned here! Check out the other guides on how to install the php application, Magento!
http://net.tutsplus.com/articles/news/easy-e-commerce-with-magento/
http://net.tutsplus.com/tutorials/other/getting-started-with-magento-ecommerce/
Hi, nice tut. I’ve been trying to implement a design in magento, i’m a designer so i’m not good with programation languages. And i’m wondering if somebody knows how to create a Magento site from a photoshop or a good tut that could help me. Thank you :D
Great! I was looking for an eCommerce Solution.
If you’re looking for a complete screencast series on Magento theme design, check out :
http://www.ecommercedeveloper.com/articles/1802-Building-a-Magento-Theme-Start-to-Finish-Part-13-Turning-the-Page
Great start! Keep it coming…
I have to agree with the others above… Great Tutorial! Incredible content as usual. Keep up the good work, envato seems to be kicking butt lately!
Anyone know about the hosting requirements for Magento?
I have read that it is meant for dedicated machines and run like crap on shared machines.
Who is the better of the hosting companies when hosting a Magento site?
Thanks…
Great! I was looking for an eCommerce Solution.
Magento needs a decent server to run on especially if you’re planning on running multiple shops. I heard through the forums that it needs a mem limit of at least 256mb -> 512mb to get it running smoothly, so check your memory limits with your hosting before installing. servage.net offers real good hosting if you need some, and also has the correct SSL certificates if you want to go commercial with it.
Excelent tutorial for E-Commerce Magento!!!
A greeting.
It took a long time to get the CSV correct, especially when you start adding your own values. I then tried the XML and it was a lot easier apparently. So for people who do an export to your var/export it might be easier to import an xml. Filesize does matter I know, but it makes things so much easier. Also I saw a lot of posts on the forum regarding the CSV having problems with empty values and such, XML will solve your problem, and or try using openoffice calc => importing csv’s can be a real hassle.
Great !!! Thanks….
Right now I’m implementing it in an ecommerce project I’m working on.
Seems promising…
great article, if only I could get the thing installed through!
Does any one know of some cheap hosting that can run magento with out editing the core php files?
I need to set Magento up on a local host so i can play around with making a theme.
Never set up a local host before, don’t suppose anyone can point me in the direction of a local host set up tutorial. and even better, a tutorial as to how to set up magento on said local host :)
This is a great set of resources and info. Can’t wait for part 2!
wow, good work need to take a look at this… I got a very interesting idea of this!
Great job thank you very much for this excellent article :) . Can’t wait for part 2!
thanks for sharing the information about magento.
its down to the community to improve magento, we are where WordPress was about 5 years ago.
lots of exciting additions to come. let’s hope varien listen to the developers designers and end users of magento.