Thursday, January 7, 2010

Installing Magento

Installation

* Please refer to Magento's system requirements to ensure you have the appropriate platform and environment set up. If you attempted to install Magento and the installation wizard suggested to use the PHP-CGI workaround, please click here.
* Download the .zip or .tar.gz file from the Magento website and decompress it.
* Upload the Magento web files to your web server via FTP (if you have SSH access and are comfortable with the command line, check out this wiki post.
* Create a MySQL database and user/password for Magento This step varies by hosting provider and is out of the scope of this document. Consult your provider's support/documentation for instructions on how to do this.
* Ensure that the file magento/var/.htaccess, the directories magento/app/etc, magento/var, and all the directories under magento/media are writable by the web server. To do so, navigate to the directory with your FTP client. Then locate the function "Change Permissions" or "Change Mode" in your FTP client and select it. Once you find the function, you must set the permissions so the web server can write to this file. There are two typical ways of representing file permissions in Linux:

* As a number (eg, 755)
* As a series of permissions categorized into user, group, and other

If your FTP client uses the first representation, set the permissions on each directory to be 777, or 0777. If your FTP client uses the second representation, set the permissions as shown in the image below. http://www.magentocommerce.com/wiki/magento_filesystem_permissions


[edit] Creating multiple sites

Adding a new website to your magento installation

* Create a new folder for the second websites
* Copy index.php and .htaccess into this new folder.
* Change index.hp to find mage.php and to load the new website
* Create new root category for second website
* Create new webiste, store, store view in Magento admin - point to new root system
* Configure URL structure for new website
* Add categories and products
* Make sure that products are associated with the new website.
* Finally, let's customize the look of the new site a bit. The logo is changed, and an actual homepage is assigned.

Note:

* Themes etc will be pulled from the main website, which is why the Base URL will be pointed to the main website. The new folder si referenced in the lnk URL.
* That there are no products - this means it's working, we didn't build the catalog for the second website yet.
* Also note that the second website is using all themes etc from the main site. This is what we configured in web tab of the Magento configuration.

[edit] Troubleshooting
[edit] Admin login problem in local installation

File: app/code/core/Mage/Core/Model/Session/Abstract/Varien.php Find(this should be line 70):

// set session cookie params
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()//,
$this->getCookie()->getDomain(),
$this->getCookie()->isSecure(),
$this->getCookie()->getHttponly()
);

And comment three last parameters(and trailing comma too to avoid syntax error), this should look like:

// set session cookie params
session_set_cookie_params(
$this->getCookie()->getLifetime()//,
$this->getCookie()->getPath()//,
// $this->getCookie()->getDomain(),
// $this->getCookie()->isSecure(),
// $this->getCookie()->getHttponly()
);

Note: This patch solves ONLY login troubles on local installations(FireFox, IE doesn’t login, Opera does).

Source: http://www.magentocommerce.com/boards/viewthread/30715/P45/#t100450
[edit] Admin page menu doesn’t work

* step1: replace the code of app/code/core/Mage/Page/Block/Html/Head.php with the one here
* step2: chmod 755 the js/ folder, and folders within.
* step3: chmod 644 the javascript files inside js/lib/
* step4: chmod 644 js/index.php

Source: http://www.magentocommerce.com/boards/viewthread/4679/P120/
[edit] Moving Magento to another server

1. From the admin, go to Configuration -> Web -> and change the (Unsecure and Secure) fields to Template:Base url.
2. From the admin, go to System -> Tools -> Backups and click on the backup button. This will create a backup of your database.
3. Make a copy your Magento root.
4. Move all data over to the new server.
5. Restore the database on the new host.
6. If you have a different username, password or database name. You’ll need to update that as well. You can find the file in (’magento_root/app/etc/local.xml’) and make the required changes.
7. Navigate to your Magento root, and delete all of the files and folders in, (i.e. /var/www/magento/var) except for the .htaccess file.

[edit] Files affected after Magento upgrade

- Your magento's default theme is replaced by the new default theme after upgrading your Magento store.
So, it is not a good idea to edit the default theme. If you want a new theme based on its default theme,
you need to duplicate the default theme and give a new name. Please refer to "Adding new magento theme".

[edit] Adding New Magento Theme

1. You can download free magento themes from http://www.templates.com/blog/free-magento-themes-for-your-web-store/,
create your own theme or create a theme based on the default theme.
2. Place the design files of your theme in magento_root_directory/skin/frontend/default/[template_name] and
the code files of your theme in magento_root_directory/app/design/frontend/default/[template_name].
3. Login to magento admin panel and go to System -> Design
4. Click "Add Design Change"
5. From the "Custom Design" drop down list, select your newly created theme.
6. You can also specify the date range for up to when a theme will display by filling-out "Date From" and "Date To" fields.
7. Click "Save"
You can add more themes for as long as all theme will have different date range.

No comments:

Post a Comment