Magento Multi-Store with Different Themes & Domains Hosted on Plesk Server

Geoff Jackson

Geoff Jackson (more commonly known by his online pseudonym zigojacko) is the founder of Design Haven and The Clubnet Group which hosts numerous agencies including the most widely recognised of them, Clubnet Digital, a full service digital marketing and creative design/development agency. He also has a personal blog but it doesn’t get updated as much as he’d like.

You may also like...

Sponsored Links...

Subscribe to Design Haven UK

Enter your email address to subscribe and receive our new posts by email.

28 Responses

  1. Mark says:

    I tried this but when I add your code to the index.php I get a white screen on both the main domain and the second domain.

  2. Hey Mark.

    Did you modify the domain name and store code in the index.php snippet to match your own?

    The white page is indicating an error (possibly syntax error), it should be logged if you want to check out your error log and see exactly what the issue was.

    • Mark says:

      I think the problem may have the line break at http://www.store
      $SERVER

      Things seem to be working now, thanks for the tutorial.

      • You may have only copied the visible section of the code Mark, there is more (below) that you have to scroll to see (or open the code in full screen).

        Glad you got it sorted though and found the post helpful 🙂

  3. Sammer says:

    I get an error when doing this:
    Forbidden
    You do not have permission to access this document.

    Any idea’s?

    • This is usually down to the permissions of the symlink Sammer.

      Refer to the last stage of step 3 in the Plesk configuration in the article and ensure that you are chowning the symlink to the same owner/group as your main domain ownership (instead of leaving it as the second domain ownership).

      Let me know if that helps.

  4. Brian says:

    Nice tutorial, followed it through easily. However I’m getting a 404 when I try to access anything in the new store. When I look at the symlink through putty and do a dir against it, it lists everything I’m expecting from the parent folder.

    My magento setup is within a magento folder so my symlink points to httpdocs/magento rather than just httpdocs. Through the browser if I type in the domain, it gives me the plesk Welcome to Parallels screen, surely it should be taking me to the magento index.php

    If I try the domain followed by /index.php – I get a screen saying ‘No input file specified’ it is like it has tried to get in through the symlink but failed, the access log file says it has a 404.

    I’ve set the PHP open_basedir to point to httpdocs/magento and set the owner/group to be the same as the main domain ownership

     

    • Hey Brian,

      The owner of the domain folder in vhosts for the second store needs to be the FTP user that you would have had to create in Plesk when adding the domain.

      For example:-

      If this doesn’t seem to help, please can you paste exactly what you have added to your open_basedir field in Plesk?

       

  5. Wojciech says:

    I followed your instructions but I am getting error: No input file specified. ??

    • It sounds like that’s a permissions issue Wojciech on your domain folder in vhosts.

      Please could you check that the permissions are as follows:-

      The above directories are CHMOD 0710 and each domain folder (recursively) have to be owned by the FTP user you created when adding the domains in Plesk.

  6. Ioan says:

    Hi,

    Thank you for this clear and simple to follow tutorial.

    When I try to access the second domain I get a white page with the following message: No input file specified.

    Any idea of how to solve this?

    • It sounds like that’s a permissions issue Ioan on your domain folder in vhosts.

      Please could you check that the permissions are as follows:-

      The above directories are CHMOD 0710 and each domain folder (recursively) have to be owned by the FTP user you created when adding the domains in Plesk.

  7. ikram says:

    Thanks for article,

    i got this error when try to access 2nd domain, i try several techniques but still not working… i follow steps very carefully
    Forbidden
    You do not have permission to access this document.

    Web Server at bargainblast.co.uk 

    • It sounds like that’s a permissions issue Ikram on your domain folder in vhosts.

      Please could you check that the permissions are as follows:-

      The above directories are CHMOD 0710 and each domain folder (recursively) have to be owned by the FTP user you created when adding the domains in Plesk.

  8. David says:

    I have also the message “No input file specified.” on domain2.

    I have check also permission :
    drwxx  5 ftpuser1 psaserv 4096 Mar 25 16:49 mainstore.co.uk
    drwxx  4 ftpuser2 psaserv 4096 Jun 24 13:40 secondstore.co.uk

    But I got still the issue.

    • Who hosts your website David? I don’t suppose it is GoDaddy by any chance?

      If so, please could you try the following…

      Open up the .htaccess file in the root of your mainstore.co.uk directory and uncomment (remove the preceding  #) the following lines:-

      Options -MultiViews

      Which you can find in the section labelled ‘GoDaddy specific options’.

  9. Lindsay says:

    HI,

    closest I’ve ever got to making it work on plesk, so thanks for the step by step.

    All I get now when I visit store2.com is store.com – the http://www.address changes, and I end up on the store.com website

    any suggestions as to where to look…

  10. adil says:

    ive used the symbolic link method, but the problem is that its not changing the theme for the other store, even though i have other themes installed. its like its not clearing the cache or something, it wont change the logo either from the magento backend or changing the meta info on the logo, any thoughts on what might be going wrong?

  11. F Miguel Gomes says:

    Hi Geoff

    Great article. Thanks you for putting it together.

    Are you available for hire?  Is this something you would be able to setup for us?

    We have had a Magento store for several years and now wish to add a new store/site.  Never done it before so we are quite afraid to break something. We would prefer to have an expert do it for us.

    Please kindly let us know.

    Thanks so much.
    F Miguel Gomes

    • Hey Miguel,

      Thanks for the great feedback and enquiry.

      Yes, we sure are available for hire (we are a full service digital agency), please feel free to give us a shout via our contact form.

      We’ve actually just implemented a multi-store environment for another client that came to us via this very article also.

      Thanks very much.

  12. Leslie says:

    Great article! I’m guessing these instructions are for Magento 1. Is the process similar for Magento 2? Thanks so much!

    • Hey Leslie, sorry for not replying sooner, I missed a load of comments in the system.

      I would suspect it would be the same process that works on Magento 2 also but I must admit, I haven’t actually tried myself yet so cannot be certain. Let us know how you get on.

  13. Steve says:

    Hi, I have follows your instructions down to the letter. However, like some others in the comments, I am getting a forbidden error, I am on my own dedicated server. I have changed all the permissions etc have set up the stores correctly and changed the index folder with the store2.com to my web doman.

    Please could you offer any advice?

    • Thanks for stopping by and leaving a comment Steve, sorry to hear of the issue your experiencing.

      In almost every case where this is happened, it is because the ownership of the httpdocs folder (and its contents) plus the symlink itself has not been changed to the web (FTP) user of the second domain.

      This has to be changed otherwise the additional domain(s) will not have the necessary permissions to view and read the main store located at the original domain’s document root.

  14. Steve says:

    Hi Mate – I did eventually get it working. What I had to do in plesk was:

    Go to domains>add domain> added “www.example.co.uk”. Then I went just underneath where you add the new domain name, to “Location of website files” and changed that from “create a new subscription” to  “example.com”, and this made example.co.uk have the same owner / subscription as the .com domain.

    I also uploaded and extracted the magento zip file directly through plesk, which gave everything the correct ownership and eliminated having to chown any folders to change ownership. After this, everything worked as it should, all except my theme. It works perfectly on the .com domain but the responisve part of it just will not work on the .co.uk domain. I have tried setting them up through the second store changing the {{secure & unsecure}} for skin, js and media – but still nothing.

    Oh and before I finish, I didn’t realise, that when setting up the second domain in plesk, I would have to wait well over 30 hours for it to go live.

    I am on a dedicated server, so I am not sure if the same steps need to be taken on a shared server using plesk.

    Thanks in advance for any advice you might be able to offer!

    Cheers

    Steve

Leave a Reply

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

%d bloggers like this: