How to Set Up Multi-Websites on Your Magento Store?

Today, in this tutorial, I’ll guide you in the process of setting up multi-websites on your Magento ecommerce store with absolute ease. The following step-by-step guide will help you establish 2 stores on a website and by adapting to the same technique, you can set up multiple stores on the site without any hassles.

If you want to set up 2 websites for each site, follow the below steps and you’ll be able to achieve it no time.

Step 1: Login to the admin panel.

Step 2: Go to System --> Configuration and click on Manage Stores

Step 3: Click on Main Website to change its name to "first" or however you want to call it.

Step 4: In Code field there, feed "first".

Step 5: Do it same for "Main Website Store". Call it "first" and Default Store View will be changed to “first”.

Now, let’s start creating the second website.

Step 6: Add a website named "second" with code "second".

Step 7: Add store called "second" and assign it to website "second" that you can chose from drop-down.

Step 8: Add new store view called “"second"” with code "second" and assign it to "second" which you can find in drop-down.

Fine! Now, create the URLs in this way:

1) http://www.example.com/first

2) http://www.example.com/second

How to create folders in the root directory?

Also Read: How to Picturize Business Scenario from User Activity on Your Magento Store?

In your Magento installation directory, make 2 directories called “first” and “second”

Step 1: Copy index.php and .htacces from your root directory in each of those new directories.

Step 2: Open .htaccess files on both directories and change the following lines.

In the “first” website, search for "#RewriteBase /magento/" or “RewriteBase /” line and replace it with “RewriteBase /first/”

In the second website, search for "#RewriteBase /magento/" or “RewriteBase /” line and replace it with “RewriteBase /second/”

Step 3: Open index.php and change the following lines.

$compilerConfig = MAGENTO_ROOT . '/includes/config.php'; to $compilerConfig = ‘../includes/config.php’;

$mageFilename = MAGENTO_ROOT . '/app/Mage.php'; to $mageFilename = ‘../app/Mage.php’;

In same file last line there is a function Mage::run($mageRunCode, $mageRunType);

In the “first” website change to Mage::run(‘first', ‘website’);

In the “second” website change to Mage::run(‘second', ‘website’);

How to configure the websites in the admin?

Configuring the First website:

Go to System --> Configuration and select Current Configuration Scope: select first website

Set Base Link URL to {{unsecure_base_url}}first/ and uncheck the Use Default

Configuring the Second website:

Go to System --> Configuration and select Current Configuration Scope: select <em>second</em> website

Set Base Link URL to {{unsecure_base_url}}second/ and uncheck the Use Default

Clear the cache in cache management Admin by navigating System --> Cache Management.

Now you can access your both website by these links.

1) http://www.example.com/first

2) http://www.example.com/second

So, by now, you’d have created two websites on your Magento ecommerce website for reaching out wide range of audiences worldwide By following the same method, you will be able to set up more number of stores on your Magento website.

Related posts

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code lang=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" extra="">