switch


Magento Guide, Part 1 – Installing Magento

April 16, 2008 at 12:10 pm, Category: General Computing, Web Hosting, by Ewan

Magento Guide

This is the first part of what will be a series of guides on using the new eCommerce system, Magento. The best place to start is always the beginning, so the initial subject will be Installing Magento in your web space. This guide will include the Installation Guide, a brief Troubleshooting Section, and finally some Useful Links.

How to Install Magento – Option 1

Buy PHP 5 Hosting with NuBlue. Then we can install it for you, for free, in about 10 minutes*. All you need to do is give us a few details – what you would like the Magento username and password to be, and what you’d prefer for a database name, username and password. It might help if you’re planning on building non-UK eCommerce sites to specify the time zone, default language and currency. And that’s about it.

*‘About’ 10 minutes. If you need to change your DNS, if we need to get some details from you, if you ask us to install it at 3am, it is going to be a bit longer than 10 minutes.

How to Install Magento – Option 2

Before you install Magento, you’ll need to create a database. Make a note of the database name, the username, and the password. Then you’ll need to download Magento – from here.

Step 1 – Uploading

Unzip Magento and upload the files to your web space. Once this has finished, unless you want customers to navigate to www.yourdomainname.extension/magento/ to view your nice new eCommerce store, you will need to move the contents of the Magento folder into your root folder.

For instance, the root folder for NuBlue web sites is httpdocs. If you install Magento in httpdocs, then whenever a customer types in your domain name they will go straight to your Magento site. If you leave Magento in the Magento folder, they will have to go to www.yourdomainname.com/Magento to view your site.

Once you have Magento where you want it, you will need to set the file permissions.

Step 2 – Permissions

The following files and folders need their permissions set to the number ‘777’, so that Magento can save data properly:

/var/.htaccess
/app/etc
/var

All the directories under /media

To illustrate this, we will be using the FTP client, FileZilla (you can follow the link if you want to download a copy). Just right click on the folder or file you want to change the permissions for, and click on ‘File Attributes’. You’ll now see a box a bit like this:

mag3.bmp

The number 777 means that all types of user have full permissions with this file or folder. You can also tick all the Read, Write and Execute boxes for the three different User Types (depending on what software you are using, this may be the only option you have). The option to ‘Recurse into subdirectories’ means that the permissions you set here will be applied to every file or folder within the folder you are changing the permission for – this is useful for changing the permissions for all the directories under /media, for instance, rather than manually changing everything yourself.

Step 3 – Install

At this point, all you have to do is go to www.yourdomainname.extension and you will be in the Magento installer. Though if you have installed Magento to a separate folder, you will want to go to www.yourdomainname.extension/thefolderyouinstalledmagentoin

You will then see the Magento Installer. Read the terms and conditions, accept them, and click ‘continue’.

The first set up page requires you to choose your default currency, location and time zone. As a tip, UK currency is listed as ‘British Pound Stirling’ (so you have to scroll up for once). Once you have all the details you want, click ‘continue’.

Installer - Database

At this point you need to enter your database details. ‘Host’ shouldn’t need to change, and the database name, username and password you already know. The ‘Tables Prefix’ will normally be left blank – this is only useful if you have more than one database on your site. By giving your Magento database a prefix it will start all entries in that database with the prefix, and make sure that the data won’t get mixed up with your other databases.

As for the ‘Web access options’ – neither of these options are vital. From an SEO point of view, it will benefit your site to click the ‘Use Web Server (Apache) rewrites’. And you should only click ‘Use Secure URLs (SSL)’ if you already have SSL set up.

All done? Click on ‘continue’. This step will seem to take a while as Magento is setting up the database tables, so don’t worry if it seems to be doing nothing.

Installer - Personal

This is the last page of the installation, and there is not a lot to say about it – enter your details! The encryption key at the bottom should only be filled in if you have a specific encryption key that you wish to use for your site to encrypt sensitive information, such as credit cards and passwords. Magento will automatically generate one for you if you do not enter anything in this field, and we recommend that you let it do that for you. Once you have filled in your information, click ‘continue’.

Step 4 – Enjoy

There you go – all done. Copy and paste the encryption key somewhere safe, and you’re done!

Navigate to www.yourdomainname.extension and you will be at your Magento store.

Navigate to www.yourdomainname.extension/admin to access the Admin area of your store (where you can create your Magento store).

Troubleshooting

Question: I get the following error message when I try to install Magento – ‘Warning: set_time_limit () [function.set-time-limit]: Cannot set time limit in safe mode…’

Answer: PHP Safe Mode is turned on. It must be turned off to install and use Magento. Please contact yourHost and request that they turn PHP Safe Mode off.

Question: I have set my location settings, but once I have clicked continue there are red errors at the top of the page and I cannot go any further.

Answer: You have not set the permissions correctly. The error messages will tell you what directories need their permissions set. The full list can be found above, under Option 2, Step 2.

These are the two most common problems with Magento Installations. If you have a different problem, why not try searching or posting on the Magento Forums.

Useful Links

The following links will all take you to various sections on the Magento store:

Go here to view the Tutorial Vidcasts: http://www.magentocommerce.com/media/screencasts

The Magento Knowledge Base is accessible here: http://www.magentocommerce.com/knowledge-base

Anyone interested in Templates and advanced Magento Knowledge can view the Design Guide here: http://www.magentocommerce.com/design_guide

  • http://www.scottmelhuish.com/ Scott Melhuish

    Sounds great.
    Will Magento run on sites hosted on one of your Reseller packages (ie do they run on PHP 5.2), and will you still do the free install on reseller hosting?

  • http://www.nublue.co.uk Ewan

    Hi Scott,

    Magento runs on all of our packages, as long as you are on our PHP 5 Server – just select the PHP 5 package on the order form (or request a move if you’re an existing customer). We will still do free installs for Reseller Hosting – it just might take a bit of time if you are asking for multiple installs!

  • http://www.debtdoc.org Debt Doctor

    Got here from a search nice blog, i like the layout of your site any ideas where i can get simliar for a new blog im going to start?
    Thanks appreciated.

  • http://MaxTheITpro.BlogSpot.com MaxTheITpro

    I’m looking to push Magento here in East Africa. Right now, I’m using CubeCart 3.0.17 but I LOVE all the goodies in Magento. Is it also multi-lingual like CubeCart??

  • http://www.nublue.co.uk Ewan

    Magento IS multi-lingual, but I cannot advise whether it currently supports the language/s you require. I’d advise you to first, look in the admin area in Magento’s demo store – you’ll want to look under System – Configuration – and see if your language is supported. It would be worth looking in the Magento Forums as well, as there are several multiple language topics in there that may advise you on any projects to add the relevant languages to Magento. Hope that helps.

  • User123

    Are the CHMOD directories still correct? For instance, there is no /app when I download the installer + even if I do chmod the listed files & directories to 777 the installer will not run

  • paul

    Thanks doesn anyone know an easy method to move a Magento site from one server to another ?
    Seo ltd

  • Ewan

    Hi Paul,

    It depends largely on what access you have, both to the ‘old’ and the ‘new’ server!  If you have SSH access it is notably easier; if you are moving to another server with the same control panel, the built-in backup services may help you move it over too.  And most panels have migration managers to handle this for you (if you have administrator access on both servers).

    Some useful links for you, these cover a few methods of moving the store:

    http://www.magentocommerce.com/wiki/groups/227/moving_magento_to_another_server
    http://www.magentocommerce.com/boards/viewthread/193489/#t238652
    http://www.magentocommerce.com/boards/viewthread/27272/P0/

    Hope these help!

  • Edwin L.

    Ewan/Fellow Bloggers, a question plz. If I need to install multiple websites under one magento install, and I don’t want ‘magento/store1′ with http://www.mydomain.com/magento/store1 (instead, http://www.mydomainstore1.com will be good), how is magento generally placed in the install? I’m guessing to put the install directly under httpdocs without the ‘magento’ directory, and worry about the domain mapping with Apache Virtualhosts later? Please confirm if so. And by the way, when magento is directly under httpdocs without the magento directory, I’ll need a separate Apache install to run other CMS in the same box, correct (it’s a dedicated server)? Thanks in advance for any input.

  • NuBlue

    Hi Edwin,

    Sounds like you’ll need to utilize the multistore aspects of the magento installation. You can create an installation within a “primary” domain name, this would be installed into the root of httpdocs. You would then add any additional domain names as aliases and modify the index.php of the magento installation to handle the stores depending on the domain name, for example:

    Swapping Mage::run(); with:

    switch($_SERVER['HTTP_HOST']) {
            
            // Shoes.com
            case ‘shoes.com’:
            case ‘www.shoes.com’:
                   Mage::run(‘shoes’, ‘website’);
            break;
            
            // Hats.com
            case ‘hats.com’:
            case ‘www.hats.com’:
                   Mage::run(‘hats’, ‘website’);
            break;
            
            // Shirts.com (default store)
            default:
                   Mage::run();
            break;
    }

    As long as the stores are created via the manage stores area in magento this should work fine.

    With regards to the CMS its going to be difficult to get them to run in the same directory without some tweaking of file name etc. You could probably use the CMS functions of magento in a specific store view and strip out the shop aspects to give a more of a website feel than a shopping cart and that would remove the need for an additional installation of software. However I do admit, the CMS functions of magento may not be ideal for this.

    Luke

Our Client Line Up

Terms and Policies: Privacy Policy | Terms and Conditions | Environmental Policy | Equal Opportunities Policy | Sitemap
© NuFuture Ltd 2005-2010. Company No: 05523340 | VAT No: 865 6930 80