Need some help?

I'm usually available for small jobs or problem solving with jQuery or css, at reasonable rates. Just get in touch.

Web Hosting

We recommend Clook for web hosting. UK based, great service and great value.

Buy me a drink

If you've found this useful, particularly for commercial projects, you might consider making a small donation.

Opencart – Setting up multiple stores

Here’s how to set up multiple stores on Opencart using subdomains. You could use this to set up a separate store to run a different theme – for example a mobile-optimised theme.

Create your subdomain

Let’s assume you’re running your main store on, and that your web hosting locates the files for your store in its root directory public_html. For a mobile store, let’s also assume you’re going to sit this on

You need to create your new domain and point it at the same folder that your main store uses. If your hosting uses cPanel then it should look something like this:

Screenshot of additional domain in cPanel

Create your new store

The next step is to create the new store in Opencart. Go to System > Settings and click the ‘Insert’ button. This should bring up screens to create your new store. For the Store URL and SSL URL, enter your new domain, adding https to the SSL URL if you have a certificate installed. Make sure you close your entries with a ‘/’ or it won’t work. Fill out the rest of the details on the General tab, and your screen should look something like this:

Screenshot of Opencart store configuration screen

Now the Store tab. Here you need to enter the store name, and select the theme you want to use (e.g. a mobile theme). Set the default layout to ‘Default’. Your screen should look something like this:

Screenshot of Opencart store configuration screen

You can then save your new store.

Configure your new store

Opencart will create your new store with all the default settings, so you will need to amend all the store settings as required.

Opencart will not load any categories, products, manufacturers or information pages to your new store (unfortunately?). You’ll need to do all these manually, or by running some SQL queries from the backend. To do this manually:

  • Categories – From the Category edit screen, go to Data > Stores to mark the checkbox against your new store.
  • Products – From the Product edit screen, go to Links > Stores to mark the checkbox against your new store.
  • Manufacturers – From the Manufacturer edit screen, mark the checkbox against your new store.
  • Information – From the Information edit screen, go to Data > Stores to mark the checkbox against your new store.

Modules in your new store – using Layouts

If you’re using Opencart 1.5 or later, then any Modules that you have configured will not be carried over to your new store. This is a good thing, I think, since it effectively gives you control over which modules are used by your different stores. Opencart manages the display of extensions by using the concept of Layouts – which is a little tricky to grasp, I think.

A Layout is the entity which links Modules to pages and stores. When a page is to be displayed on a store, Opencart looks up the layout appropriate to that page on that store, and then finds any modules configured for that layout.

So, if you make no changes to any Layouts after creating your new store, then when a page on your new store is displayed, Opencart will search for the appropriate Layout, and not find one, so no Modules will be displayed. So, to display a Module on your new store, we need to configure a Layout.

I’ll illustrate this with an example. Let’s assume you have some Modules on your default store homepage, and you want to display the same Modules on your new store. First thing is to navigate to System > Design > Layouts and click ‘Edit’ against the ‘Home’ Layout. You should then see something like this:

Screenshot of Opencart store configuration screen

You’ll see that the existing (default) entry tells Opencart that for the default store the Layout ‘Home’ should be used with the route, or page ‘common/home’ – which is the home page. We need to tell Opencart to use the same Layout for the new store. So, click ‘Add Route’, select the new store and enter ‘common/home’ against the route – like this:

Screenshot of Opencart store configuration screen

Click ‘Save’ and you’re done.

You can probably see from this that it’s possible to display different modules on your new store homepage by creating a new Layout and assigning it to your new store only. Here’s some more details on how to do this.

You’re done

Once this is complete, your new store should display via the subdomain, with the products etc and modules that you have enabled in the steps above. Payment, Shipping and Order Totals will all be the same as your existing store.


94 responses to “Opencart – Setting up multiple stores”

  1. Smit Shah says:

    Thanks for this..
    Opencart is not having anything for modules & banners for multi-store ?

  2. Simon says:

    Yes, you can do this with layout. Have a look at this explanation.

  3. Admin says:

    How can i configure the store? I can’t find your configure style in the Admin Panel of Opencart, please give the solutions quickly.

  4. Admin says:

    Where i can install your mobile script? Directly in the root folder of hosting panel or in the folder name with M in Public_Html folder?

  5. Simon says:

    The theme should be unzipped in the root folder of your Opencart installation.
    Once installed properly you should be able to assign the theme to a store.
    You shouldn’t have a separate folder if you’re installing a mobile theme – see the instructions above.

  6. Admin says:

    Check my testing website :- It shows some errors, how can i solve it? I’m using Opencart1.5.5.1

  7. Simon says:

    I don’t think those errors are coming directly from the mobile theme. Your default store is showing the same and additional errors.
    Do you have vqmod installed properly?

  8. Dave says:

    I got it all woking but only issue i cant get the product image to show on my mobile site m.

    opencart 1.5.1

  9. Simon says:


    I can’t access your mobile site at the moment. I’ve not come across that issue. What happens? Does the rest of the site display OK?

  10. Dave says:

    I got it fixed just had to change the image file name from my mobile path to the website inage folder

  11. Don says:

    Hi thanks for this!

    My store is in a subdomain and i installed this mobile theme in the root of subdomain where is my opencart store. But it dont work not show the mobile theme.
    Is there any sollution?
    Thank you Simon!

  12. Simon says:


    The theme will not automatically detect a mobile browser as it stands. Have a look here for ways the theme can be employed.

  13. Don says:

    Thank you work fine now!

    One more question if i have thousands products than how can i import to the mobile store just one by one?

    Thank you Don

  14. Simon says:

    You can run some SQL on your database to do this – have a look here for description.

  15. Donovan says:

    Hi Simon

    Thanks for the above worked a charm. But now I’m having issues with SSL. The main site is and I have multistore set up with as the second site. I have SSL cert for (shared) but when I go to it does not go to the secure site only non secure http:// can you help? Does open cart offer this? I have looked into wildcard SSL but my hosts says that they cannot handle it and nor can opencart! Any help is appreciate



  16. Simon says:

    I haven’t done this myself, so check before buying, but I think what you need is a multi-domain SSL certificate.

  17. Tim says:

    Hi, thanks for the tutorial, I followed the directions but when I go to my subdomain. mobile.domainmcom which should go to, it goes to instead. I did include the / in setup, a common mistake I read people made. I am running thanks.

  18. Simon says:

    Hi Tim

    That sounds like you’ve got your cPanel set up correctly but there’s something wrong with the Opencart settings.

  19. Admin says:

    My we hosting provider is where i can create subdomains but can edit it, can’t make document root to public_html, when i try to make subdomain there, a new folder ‘m’ is created in the root folder of database. Now how can i solve this issue?

  20. Simon says:

    That sounds like one to take up with your hosting provider really, it’s not something that I can help with.

  21. Mark says:

    Hi Simon
    I am just setting up my multistore and seem t have most things working properly, but I have noticed that when I now try to add a new product that only the manufacturers from the second store show up iin the links tab – I have a lot of manufacturers in the default store but none of these appear.
    Any pointers on how to resolve this?

  22. Simon says:

    It sounds like you don’t have the manufacturers enabled for your second store – like products, they can be enabled/disabled by store.

  23. zjunyu says:

    Good Job, Thank you.

  24. Tim says:

    Thank you for answering my question earlier, you say the CPANEL is setup properly, which I know, but the Opencart is now. I have followed your instructions several times, to see what I may have missed, and everything is exactly as you show. Any suggestions? It still goes from to the site.

  25. Simon says:

    From your earlier question, is your store in a subfolder? If so is this correct on your subdomain on cPanel?

  26. taun khanna says:

    if i want to use two sites are on sub domains but there is no site on main domain .i just put a html page on main domain and put two links on it. then how will i manage both stores

  27. Simon says:

    I’m not quite sure what you’re asking. If you have two subfolders you can still set them up in cPanel to resolve the the same address and run them as one OC installation.

  28. Ian Haney says:

    Help I am stuck and not sure what to do

    I have unzipped the theme and put inside a subfolder called m and followed all the instructions and redirected it using the php code but I just get a blank white page

    The mobile site is

    Any ideas where I gone wrong

    Kind regards

    Ian Haney

  29. Tim says:

    Well, I went back to check it and it does now lead to the mobile template like it should. Now my problem is nothing loads. I get Home My Account Shopping Cart at the top, then the footer showing powered by opencart, and the name of the store.

    I did go through the process of adding the store to the categories, products etc. I also went into the modules, and did what your tutorial shows.

  30. Tim says:

    I was able to get it working, way back when I disabled the mobile_theme.xml because of a PHP error which made my site almost useless. I forgot it was still disabled. I did however find that the PHP error was with the VQMOD Refine Search Sub Category Images, which was the only free mod that allowed sub category images. If you purchase another version, it does not edit files, and works great with your mod. Thank you for a great script!

  31. Simon says:


    Sorry for the delay in replying, I have been on holiday.
    From what you describe, it sounds like there might have been an issue with your Opencart configuration – which is why you got the blank page.
    If you’re still trying to make this work get back in touch.

  32. Ashraf Tayab says:

    Dear Sir,,,
    Thank you for your Opencart – Setting up multiple stores, I am new with opencart, by reading your Opencart – Setting up multiple stores, I understand to make multiple stores.
    Thank you

  33. Agus Halim says:

    thanks for this great articles, i would like to know how is it possible to separate individual admin login page separate product, separate anything so when we totally create a new store in multistore it’s just like new setup. and other store only can see their dashboard, sales and item?

  34. Simon says:

    If you’re running multiple stores from on installation then the stores share the database, so the products are stored in a single table (for example). Short of writing a fair bit of code for admin so that users can only see products from a specific store, there’s no way of doing what you want.

  35. Agus Halim says:

    since i’m not a programmer i would like to know the code how to tweak so with this single table the users only can see their products from a specific store. any paid/free service do let me know. many thanks

  36. Simon says:

    Hi Agus

    Within Opencart you can assign a product to a store, and therefore restrict certain products to only appear in specific stores. Is that what you meant? If not could you explain exactly what you’d like to be able to do?

  37. Charles says:

    Hi Simon

    I am trying to create a multistore in opencart following your steps but what happens is when I open the subdomain, it doesn’t charge the home page and anything.

  38. Simon says:

    I get a not found error on your subdomain. This suggests that the subdomain isn’t set up correctly rather than anything to do with Opencart.

  39. johnny p says:

    Good morning,

    I create all steps specified here:
    1. I create an sub-domain using CPanel
    2. I specified from setting on ¨Adress URL¨ as your description :

    So, I don´t see the theme choose instead of those message which can be see if you will type in browser the adress of my sub-domain.
    What I don´t understand is if the steps is so simple, why don´t work?

    I waiting much early is possible your answer and advice or other sugestion which can help me to resolve the error.

    Thank you in advance for support and collaboration.
    Best regards.

  40. Simon says:

    The problem there is with the subdomain – for some reason this is not working as expected. I think this is probably an issue to take up with your hosting company.

  41. Robin says:

    Hi, can you assist me for multistore? Is it possible to set multistore in different domain? Like my Main store is set into and i want to set another store in different domain as Is it possible?
    I am also getting issue related to layout thing, as its showing some modules in all pages of substore.


  42. Simon says:

    You can run multistore on different domains, yes.
    You can control which modules appear by creating a layout which is store specific.

  43. simon says:

    Great article – the only place I’ve seen mention of layouts which had flummoxed me for a while!
    I have a multi-store setup but in admin on my second store, on the server tab of settings I only see the Use SSl section and nothing else. Any idea how this has happened or how to correct it?

  44. Simon says:

    That’s not an error. The rest of the settings can only be set per server, rather than per store, and so only appear on that tab on the default store Settings > Server tab.

  45. simon says:

    Really? I’ve spent ages trying to spot what was wrong!
    If that’s the case how do I put the second store into maintenance mode but leave the default store live?

  46. Simon says:

    You can’t do that out of the box – I dare say there’s an extension that’ll do it. However, you could do this via by creating a specific maintenance theme which has nothing on it except a ‘sorry’ message, and then setting your desired store to use the maintenance theme.

  47. simon says:

    That’s a good idea. I’m slowly getting the hang of Opencart but odd little tricks like that evade me for now.
    Really appreciate the help.

  48. Jacky Wu says:

    Hi Simon,
    I have problem with multi-store setup on my Opencart 1.5.6 with default theme. I have recently registered a new domain, not subdomain of my main one. I then followed the instruction on Opencart forum to create multi-store using different domain. However, when I tried to access the new domain, I was expecting to see the default Opencart storefront. It did not show me that, rather a default web site page saying that the domain have been moved or something. Do you have any idea what is wrong? Thanks.

  49. Simon says:

    Are the two domains on the same hosting? If not then you will need to load up Opencart files on the new hosting as well – although you can use one database to server both sites. I have done this and it works fine – the only minor challenge is managing images across two sites.
    If they are on the same hosting then fro what you say there could be something wrong with how you have the domain set up in cPanel.

  50. Moni says:

    Thanks for the useful guide. Some of our customers are having troubles setting up their stores, so we will make sure we send them your way.

  51. Adam says:

    Hi Simon, thanks for the tutorial…
    Are you able to explain the first part of the setup in more detail for me. I ask, as I can’t get this step to work.
    You state to point the document root to the folder where the files for your store are kept.

    I have an opencart store installed in public_html/domain/store/
    When I create a subdomain – I should use public_html/domain/store/ as the root? Or should it be public_html/domain/ ? Does it need to have the trailing ‘/’?
    I’ve stride both and neither redirect to the open cart front. I have added the domain into OC settings but when I go to the I get the standard hosting provider 404 page.
    I have tried a variety of combinations without success.

  52. Simon says:

    Hi Adam
    If your OC files are in public_html/domain/store then yes, the subdomain should point at this directory. You don’t need the trailing slash. If you’re just getting a 404 there’s something wrong somewhere, obviously. I’m assuming this problem has persisted for a while (subdomains tend to take an hour or so to become accessible due to caching etc) – if so it might be something to take up with your hosting company.

  53. Adam says:

    Cancel that last comment – I worked out that although our store was in a /store/ folder, the install for OP was actually in the root (!). This was hard to spot as we have 100+ domains in the root. Thank you anyway!

  54. Mr. T says:

    Product categories are not displaying on the mobile theme or subdomain but are displaying on the the primary site. Kindly advise.

  55. Simon says:

    Have you enabled the categories for your secondary store?

  56. kernelbit says:

    Hi Simon, I need multiple stores, but in two different hosting providers(2 domains in hosting ‘A’, and 2 in ‘B’), I read comment 49(yours..), but I can’t understand it very well…can you explain it a little bit more detailed, please? Thanks in advance

  57. Simon says:

    Not the simplest thing to do. First all the files need to be duplicated across both stores, then you need to set your database (say on A) to be able to receive remote data requests from B. You’ll want to monitor the response time for this as well.
    You should be able to set up the sites as normal from Opencart admin.
    The messiest bit is uploading images because you need the images to be duplicated across both servers. However, Opencart will only upload the images to the server you’ve logged on as admin. You could add some code to FTP to the other server when the image is uploaded or perhaps set both sites to use the images on one server. I’ve done the former but not tried the latter.
    I’m assuming you can’t have all the sites on one server because you want multiple SSL certificates?

  58. kernelbit says:

    “…can’t have all the sites on one server because you want multiple SSL certificates?”
    Nope… My boss have some kind of personal interest on maintaining the 2nd host… but I’ll say him it’s so complex, so I hope he will understand…
    Anyway, I’ll try this…who knows


  59. Mark Welton says:

    Great tutorial. I have set up several different multi-stores under my main site. Question: How can I add customized or multi-store specific “About Us”, “Terms”, “Social links”, etc? This is preferred but If I can’t, then can I hide the footer on those pages?



  60. Simon says:

    OC allows Information pages to be set by store, so you should just be able to define which store(s) a page should appear on. Not sure if ‘Social Links’ is a page as well or actual links in the header etc. If the latter then this can be set by store, perhaps by creating a different theme for each store and amending the header.tpl within the theme to reflect what you need.

  61. Michael says:

    I installed the store on and I made a few adjustments on it but I cannot get the blueish background off the front page as you can see what adjustments I have made. also when I go to the blog, it shows 2 slides, please advise of what can be done to correct these issues.


  62. Simon says:

    The blue background on the menu comes from this:

    .link_list li a {
        background: url("../image/m_arrow.gif") no-repeat scroll 97% center transparent;
        display: block;
        font-size: 1.2em;
        padding: 0.5em 0 0.5em 0.5em;
        text-align: left;
        text-decoration: none;

    Looks like you might have two slideshows modules set up there. I’d start by making sure you have this set correctly on admin.

  63. Michael says:

    Thank you Simon, you are a true gentleman and GOD!! I solved the double slideshow problem and got the menu background the way that works for us.

    1 major change we made was with the addthis social share feature. We updated the script from the old js/250 to the js/300.

    Made sharing our products 100% faster and easier.

    Thank you very much.

  64. Tom says:

    Hi Simon… your tutorial has been of great help, Thank you!

    I have a problem: I have two separate domains running off the same database. Both domains are using the same database username and password. But the store information for both the domain overlaps. If I change the logo for one the other reflects the change too. The same goes for store name, address, etc. How can I have one database and run two stores off it with completely different identity info and images (like logo).

    I would appreciate your help.


  65. Simon says:

    Have you created two separate stores within Opencart? Once this is done you should be able to separately edit the logo, and if using OC1.5.x, the store address as well.

  66. qasim says:

    i have created a subdomain and given the folder or diectory as root where my main store exist but i am unable to access that subdomain . how mauch time is required for a sub domain to b active

  67. Simon says:

    I’d expect it to be OK in a couple of hours normally. If it’s still not working looks like something’s wrong with the setup.

  68. Marc says:


    wondering how I can get the last module gonna work on my 5 different multi-store?
    I’m trying to fix that go to setting> Design> Layout and select Default adds all my subdomain multi store but the problem is that only 2 multi-store may last module that works,
    three other multi-store so it does not work?

    where is the problem?
    should I create laste module each store?
    or do I have different themes for each store?
    why do not the main domain running laste modules on subdomains?
    module should work all the multi-store
    Can you help me,,

  69. Simon says:

    I’m not sure exactly what you’re saying here. I think you’re saying that you want to use a module (Latest?) on different stores on a multi store setup. I think you’re saying it doesn’t appear on three sites. If so check that the theme supports the module, perhaps by changing the theme on a store where the module fails to a theme where it works. Does the store where the module fails have any valid products? These are things to try first. If I’ve misunderstood have another go at explaining the problem.

  70. imam says:

    hello, i just installed and work perfectly, but i lost some thing. how to get search box? please help this thing thank you

  71. Simon says:

    Um, what’s working perfectly? Multiple stores?

  72. Toni says:

    I have done as said. but the multi store directory is empty. Am i to upload some files to the directory or this is meant to happen automatically once I insert a new store?

  73. Simon says:

    You should only have a single set of files. Both stores will use the same files and database – assuming that both domains are running on the same hosting.

  74. Toni says:

    Can you please send me an email. will like to share with you what I have here. Also is there an extension or module i am to install for this to work properly?

  75. Simon says:

    You can send a private message via the contact page if you want. Multistore does not need any additional extensions.

  76. Simon says:

    Either you have an error with how you have the subdomain set up in cPanel, or your secondary store is not set up correctly in Opencart. I’d guess the former.

  77. Toni says:

    I have followed it to the letter. Create sub domain. copy file path, insert new store… fill in all necessary content then save. it isn’t just working

  78. Simon says:

    OK, well, there’s something not right. I can’t tell anything just from seeing the site. You say subdomain, but the links you sent are subfolders, not subdomains. To offer more help I’d need to see your cPanel and OC settings.

  79. Annemiek says:

    Does anybody know, whether it is possible to apply multiple sizes for one product by using the multistore feature? This is often the case in the clothing industry, where multiple sizes are given for each location/country. THANKS!

  80. Simon says:

    There’s no way of setting an option by store, no. The only way of doing this out of the box would be to create two different products.

  81. Smritimay Debnath says:

    Hello, I got this error when I open my store –

    You don’t have permission to access / on this server.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.”

    What should I do?

  82. Simon says:

    Impossible to tell really, but that sounds more like a server issue than anything with Opencart.

  83. Smritimay Debnath says:

    Sir, I think you didn’t get my problem. I give you details of that error. I have one main domain, like “” and I create one subdomain, like “”. so “” is working correctly but when I open “” at that time it gives that error.
    please help me…

  84. Simon says:

    As I said, something wrong at the server end, possibly you haven’t set up the subdomain correctly.

  85. Smritimay Debnath says:

    can I use “” instead of “”?

  86. Smritimay Debnath says:

    If I create a subdomain, like then is the server automatically create the folder called watches or not?

  87. Simon says:

    No, you have to set the folder manually. But for an additional store the folder should be the same as your main store, as described above.

  88. Smritimay Debnath says:

    then how to link with “watches” folder with the opencart?

  89. Simon says:

    You should not have a watches folder. The watches subdomain should be pointed at your main opencart folder, as described here.

  90. Smritimay Debnath says:

    sir, if I change the extension name of “.htaccess.txt” to “.htaccess”, then the website shows “page not found”. what should be there means “.htaccess.txt” or “.htaccess”?

  91. Simon says:

    It should be .htaccess. I can only guess, but it sounds like you have something wrong in your .htaccess file which is redirecting to a page that doesn’t exist.

  92. Smritimay Debnath says:

    what should be the change in the .htaccess file. can u tell me please

  93. Simon says:

    Can’t answer that without knowing how your server is set up. I suggest, if you are having problems, deleting the entire contents, then disabling and re-enabling SEO URLs in OC.

Useful? Interesting? Leave me a comment

I've yet to find a way of allowing code snippets to be pasted into Wordpress comments - so if you're trying to do this you'd be better off using the contact form.