Stack Exchange network consists of 177 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Given a store id, how do I get the website id that matches that store?
Or do a direct database lookup on the core_store table.
Just for completeness: From the current store you're in, you could retrieve the websiteId as follows:
In Magento 2 to you can find the Website Id using store id like this:
If you have database access you can directly check website id in store_website table
Required, but never shown