I have a pure php site where you need to login to see the info (e.g. its forum like system) , the system has users and groups with permissions. However, I want this system to serve different companies, so each company access the site and see only its data. The common way I did it is replicating the whole code and DB and just install it several times on my sub domains. I wonder if there is a best practice so I can install it only once somehow and make sure each company see only its stuff and can admin it.