I want to install 2 magento2.4.4 on my server and connect with single database .

3 Answers 3


Is there a reason why you would not make use of the Magento multi-store functionality? Two applications passing data to the same database at once seems to be a bad idea, in my opinion.

Multi-store allows for multiple URLs, as well.


I also don't see the benefit of using the same database for 2 instances; it will just lead to performance issues, and complicate work for developers.

Also, I guess many extensions will have problems with this setup.

However, to answer the question: At least one of the instances needs to have a db->table_prefix set in app/etc/env.php; you need to set this value before installation.

That's all.


It's Overlapping your both site, it's not possible to 2 site in 1 database, both data overlapping every update, so i'm not prefer to you. But you can do it with app/etc/env.php in give databse name for both site.

New contributor
Pranav vyas is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.