Enable ERP application to support multiple clients
It depends entirely on the architecture of your application and your database structure, if the refactor is too heavy, the solution might be multiple ERP instances. In addition, since it is an ERP (with company sensitive information), you can have the instances installed on different servers so that your clients do not store financial information with other companies on the same machine.
You can have one "big" server, virtualized. I suggest you have a reverse proxy to route requests from multiple subdomains to your virtualized guests. Alternatively, you can create a virtualized server template with Apache, PHP and ERP installed, ready to be installed on the virtualization host. When a customer purchases your product, you simply install and enable that virtual guest and provide access to the customer.
a source to share
You can reinstall it on the second server. If you have a license to do this, of course. What is an ERP Application?
Edit:
For our ERP product, I use a URL segment to differentiate the database. eg.
http://myserver.com/company1/customers
against
http://myserver.com/company2/customers
All URLs embedded in documents are relative URLs, so they stay with the same company.
a source to share