Magento comes with many features and uses for online store owners. One of the most useful features of Magento is its ability to make multiple stores with the same backend installation. This is made possible by allowing multiple storefronts to share common code base and backend, making administration of stores much easier. Stores can share customer base, products catalog, and settings based on how you decide to configure them.
In this article, I am going to show you how to setup multiple stores using a Magento admin.
Creating Front Store
First, you have to create a front store. To create a front store, follow these steps:
- Install Magento and login to your Magento admin.
- In the top menu of your Magento admin, go to Catalog > Manage Categories.
- After this, click Add Root Category button.
- In Name field, enter the name of your new store.
- Under Is Active, select Yes.
- Under Display Settings, in Is Anchor, select Yes, and select Save Category. (Shown in the Image Below)
- After this, go to System > Manage Stores.
- Click on Create Website button.
- In Name field, enter your new store name.
- After this, enter a unique code in the Code field without spaces and click Save Website. Remember to write down this code, so you may use it later.
- After Creating New Website, click on Create Store button.
- In the Website field, select the website that you created.
- In the Name field, type a name for your store.
- In Root Category field, select the root category that you created. Click Save Store button.
- After creating New Store, click on Store View button.
- In the Store field, select the website that you created.
- In the Name field, type a name for your store.
- In the Code field, enter a unique code to identify your store view.
- Change the Status to Enabled. Click Save Store View button.
After this go to System > Configuration.
- In the Current Configuration Scope, select the website that you created.
- Select the Web menu, and click to expand the Unsecure and Secure sections.
- For each section, clear the Use Default check box next to the Base URL and type the URL for your store. Click Save Config.
You just successfully set up your new Magento store.
Configure the server to load new Magento stores
After creating your stores via the Magento admin panel, you need to prep up your server before loading your new Magento store onto it. There are several ways of doing this. In this article, I am going to share the most common and useful method that works for any Magento version.
First, you need to separate directories for each of your stores using secondary domains.
- For that, you need to Make sure that the domain you wish to use is pointing to the server.
Follow the instructions given below to create a secondary domain with Cloudways for your new store.
- First, log in to the Cloudways Platform with your Username and Password. Then, click on your Application.
After this, go to Domain Management under the Application Management section.
After this, click the ADD DOMAIN button. Now, enter the domain name that you used in your Magento Admin’s secure and unsecure tabs in the Base URL field.
After creating the secondary Domain, add the following Code in your .htaccess file.
SetEnvIf Host www\.newstore\.com MAGE_RUN_CODE=domain1_com SetEnvIf Host www\.newstore\.com MAGE_RUN_TYPE=website SetEnvIf Host ^newstore\.com MAGE_RUN_CODE=domain1_com SetEnvIf Host ^newstore\.com MAGE_RUN_TYPE=website
Now save your file!
You just successfully configured your multiple stores on the Magento application on Cloudways. You can now start working on developing your new Magento store by loading the domain in your browser.
Abdur Rahman
Abdur Rahman is the Magento whizz at Cloudways. He is growth ambitious, and aims to learn & share information about Ecommerce & Magento Development through practice and experimentation. He loves to travel and explore new ideas whenever he finds time. Get in touch with him at [email protected]