Magento Multi-site multi-domain installation tutorial (can set phone template yo, pro \ (^o^)/)

Source: Internet
Author: User

This article is a tutorial on installing the Magento subdomain, before you install it, verify the following points:

1. Please verify that the subdomain is pointing to your server first

2. You can edit the. htaccess file

3. Familiar with cpanel operation

Our goal is to create an independent online store store.xbc.me, and then install a mage.xbc.me sub-domain store, the background unified use store.xbc.me backstage. We can install a test store and sub-domain store step-by-step.

First create the database, add the store database on the MySQL database page of the cpanel panel

Using password generators to enhance security

Authorization for Xbcme_store users

Grant Full permissions

Add a subdomain, the store.xbc.me directory points to Root/store/magento

Add sub-domain mage.xbc.me, and store point to the same directory.

Now there are two subdomains. Root stands for your root directory.

store.xbc.me corresponding directory Root/store/magento

mage.xbc.me corresponding directory Root/store/magento

Upload Magento installation package to Root/store, I am here to test the installed version of 1.6.1. The Magento folder is automatically generated after decompression.

If you want to install the sample data, you can use media inside sample-data to replace Magento, and then import the Sample-data sample-data. Sql.

Now that you have access to http://store.xbc.me, you will see the classic installation interface for Magento.

Using the default settings is all right, just point to continue.

Add Database Information

Web settings, using the default settings.

Create an Administrator account

After the installation is complete, go to background system-> Manage Stores.

Click Create Website

Create a new Web site

Name:Mage.xbc.me

Code:mage

Sort Order: The Order of the display, optional.

Save the site, click Save Website, create a new store, and click the Create store.

Select a new Web site: Mage.xbc.me

Website:Mage.xbc.me

Name:main Store

Root Category:defult Category

Save the store and click Save. Create a view of the store, click Create Store View.

Fill in the store information you just created.

Store:main Store

Name:english

Code:mage_en

Status:enabled

Sort Order: Optional.

To save the View information, click Save Store View. You can see the information we created on the Mage.xbc.me website.

Now open the URL to configure the Mage.xbc.me Web site, go to system->configuration, select Current configuration scope is mage. Xbc.me

Select the General->web option, set the unsecure and secure options, and remove the Use default view's Radio box

Set the base URL to http://mage.xbc.me.

Follow the official multi-site Installation wizard to modify the. htaccess. Open the. htaccess with your familiar editor and add the following at the end:

Setenvif host store\.xbc\.me mage_run_code=basesetenvif host store\.xbc\.me mage_run_type=website SetEnvIf host mage\. Xbc\.me mage_run_code=magesetenvif Host mage\.xbc\.me mage_run_type=website

Open Http://store.xbc.me and http://mage.xbc.me are all available for normal access.

==========================

magento In the background settings we will use in the next step is the second step Span style= "FONT-SIZE:10.5PT; Font-family: ' The song Body '; >create websitecode :two

2. modify the root directory index. php file

Open The Magento Web site root directory, edit the file index.php

Will

1 Mage::run();

Replaced by

1234567891011121314151617 switch ( $_server [ ' Http_host ' ) {  case ' two.com ' :  case Www.two.com ' :  mage::run ( '" ' website ' );  break  default :   Mage::run ();  break  }

If you want to add more domain names, repeat as above steps

At this point, the setup is complete and can be accessed using two.com

Recently someone has reflected such as on the steps after the website cannot run, do not panic, such as the article is before for Magento version 1.2 applicable, the other version is not. New Magento version See Http://www.magentocommerce.com/wiki/multi-store_set_up/multiple-website-setup or Google under "Magento Multiple websites "

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.