cancel
Showing results for 
Search instead for 
Did you mean: 

Sharing database for two websites

Sharing database for two websites

Hello,

 

I would like to move my 2 ecommerce websites away from Joomla and onto Magento. I would like our stock to be updated automatically on both websites (which sit on two different domains / TLD's). So for example, if "product x" is sold on the German website, 1pc of "product x" should also be removed from the database on the French website (so the stock levels stay up to date without manual intervention).

 

With Joomla I was taught each new website installation should have a seperate database. How is it with Magento and do the same rules apply? If so, is there any way with Magento for stock to be controlled (communication between 2 databases) so that stock levels can be automatically updated, no matter which website makes the sale.

 

Your help and feedback would be greatly appreciated.

Thanks

10 REPLIES 10

Re: Sharing database for two websites

Hi Dav,

Magento has a great multi-store functionality built-in. You do this by setting website/store/view combinations.


Example 1: If a business sells to two countries, Finland and Russia, we setup different websites on separate sub-domains or domains. Stores will run from the same database/magento installation but can have separate products, shipping and payment methods and etc

Example 2: If a business sells with two languages in one country, i.e. in Finnish and Swedish languages in Finland, then we set those up as a “view”. They have the same products, shipping methods, etc but can have separate designs and languages.
so "Views" take care of the languages

but with setting up different websites in the same Magento installation, you will need your hosting support people to cooperate. We do this for our clients because we also manage the servers but I'm not sure if you can do this on a shared hosting.

 

some documentation: 

http://devdocs.magento.com/guides/v2.0/config-guide/multi-site/ms_websites.html

https://www.mageplaza.com/kb/how-to-create-a-new-store-view-magento-2.html

 

hope this helps.

 

Anton Pachkine @ magento2.hosting : Magento Small Business Package.

Re: Sharing database for two websites

Many thanks for your reply on this. Can you also let me know if this 3rd option also works (slightly different to what you listed):

 

2 seperate websites on seperate URL's, each website in a different language. However both websites offer exactly the same products, shipping options and payment methods. Only the language of both websites change. Both websites should run from the same database (to manage stock centrally).

 

How would this scenario change things and is that still possible with magento?

Thanks again in advance

Re: Sharing database for two websites

yes, it will work. you still need to have 2 stores setup to be able to point different domains to each store. but both stores can show the same set of products and views will be different for each store so you can have your languages setup in each view.

 

Anton Pachkine @ magento2.hosting : Magento Small Business Package.

Re: Sharing database for two websites

Thanks for your reply.

 

OK so when you actually setup both Magento installations, you just have to point them to the same database? Is that approximately how it works?

Re: Sharing database for two websites

Not exactly. It will be one installation of Magento on the server and both domains will be pointed to that account on the server and Magento will manage which store to show for which domain so your customers will see one store when they come to one domain and another store when they come to your second domain.
You do not want to have multiple installations of Magento - it will not be fun to manage. Updates, security, customization, extensions. All have to be done twice and synced.
You may want to have someone to set it up for you because it will require server configuration changes.
Anton Pachkine @ magento2.hosting : Magento Small Business Package.

Re: Sharing database for two websites

So quite different to how Joomla is setup then.

I guess the question now is if my shared hosting can support this type of configuration. I will drop them an email.

 

Thank you again for your reply.

Re: Sharing database for two websites

Hello again,

 

The reply from my hosting said that they can host a Magento installation with several sites running off the same database, but advise against this as it may really slow down the sites performance. On Joomla, both my sites are about 150MB in size, and the hosting plan I have allows a database size of 1000MB.

 

It seems to me a bit silly not running both websites (as they are relativly small) off the same database. What you reckon?

 

 

Re: Sharing database for two websites

several sites running off the same database

 

this is not several sites running from the same database. you'll have only 1 site and 2 domains pointed to it. Magento will just show different data according to the domain used to load the store. as long as you have Varnish configured properly and your shared server will not be overloaded, frontend will be fast. Without Varnish - do not even waste time, it will be too slow to use.

 

Anton Pachkine @ magento2.hosting : Magento Small Business Package.

Re: Sharing database for two websites

Good question. I had the same doubt and now it has been cleared from your question..!