Customizing in one site affects other sites in the same server

Hi All,

I have multiple sites in the same Ubuntu server. However, whenever I did customization of a form, that affects change in all other sites, which I do not want.

How to keep customization separate for each site.


Could it be issue related to cache? Before checking another site, can you clear your browser’s cache? Sorry if it’s too basic and doesn’t address your query.

@max_morais_dmm your heroics might help here :slight_smile:

@umair, @mijan1373 it does not sound like cache issues!

Sounds, like a wrong customization strategy!

@mijan1373 can you explain how do you customize a form?

@umair, @max_morais_dmm this is not cache issue.
@max_morais_dmm i have installed erpnext with site1 in ubuntu 14.04. Then i did 2nd site, 3rd site etc. All these sites were configured with port base multi-tenancy.

@mijan1373, you explained how you have installed your sites, but you forgot explaing how are you customizing the forms!

oh sorry, I just added a new field in a form using Setup > Customize > Customize Form > Form Type.

@mijan1373 how are you determining that the distinct sites aren’t the same?

If you are using multi-tenant, and have the “currentsite.txt” file in the frappe-bench/sites folder, you can being redirected to the same sime everytime, the browser URL can be different, but internally frappe is returning the same site!

Are you sure, that is not passing in your environment?

may be that is the issue. there are erpnext and frappe sub-folders in the apps folder. seems all sites are directing to same erpnext. how can we different app for each site.

@mijan1373 you only need remove the “currentsite.txt” in the frappe-bench/sites directory, it will solve the issue!

In fact all customizations that you are doing are stored in distinct database, so you don’t need to worry to separate ERPNext for each installation, just ensure that the “currentsite.txt” doesn’t exists, and instead of use “bench use mysite” to do something use “bench --site sitename command” to prevent the creation of the file again.


  1. removed the “currentsite.txt”.
  2. Created a new site called general.local
  3. First site name was site1.local
  4. Tried to setup general.local, but at the of running “Complete Setup” its showing error. Earlier I have added “Customer ID” field to Customer DocType in the site1.local. But, in this new general.local setup error shows that Customer ID not found. The same error shown while “currentsite.txt” file was there with site1.local as an entry.

@mijan1373 are you using fixtures?

i am not using fixtures. what is that? by the I am new in ERPNext.

@mijan1373 are standard to way to export some customizations in frappe and erpnext.

This behavior is very weird, due each site have they own database, if you only use custom fields, the things are isolated by default.

@max_morais_dmm ok, let me try another field in another DocType and see, as “Customer ID” sounds a common field name.

Hello Max,

I have a similar problem.

  1. I created a new doctype in site A
  2. Updated my to expose the doctype
  3. I visit site B and it recognizes the created doc type in A and generates table not found error. Surprised, I was forced to run bench update which fixed the problem
  4. Problem is site B now has this doctype in it now
  5. How do I edit the dashboard for a single site. Strange file structure. All sites share the same ERPNext installation. Any way to override this?

I just deleted the current site.txt file based on this post. Would the outcome have been different if this file did not exist?

Thanks a lot sir.

1 Like

@tiwiex it’s not strange it’s the perfect behavior, since frappe is an real multitenant application it follow some rules:

  • Data should be isolated, one change into one tenant never should be reflected to other tenants.
  • Plugins should be isolated, one installation of an plugin should be only for an target tenant, and plugins data also shouldn’t affect tenants.
  • There should exists an single and unique code base, and management process in memory controlling all tenants, any change into the code base should be reflected into all tenants.

So frappe behavior is fine, your development style is what’s wrong, you are changing the code base, and it never should be done except into the case of you want it to be reflected everywhere
Is for that kind of Isolation that apps exists

1 Like

@mijan1373 @tiwiex

I suggest you create a seperate application with your cusomizations and new doctypes and only install on specific sites you want it on. The target site is the only one which will have the changes. In your case changes appeared accross board coz u were editing the erpnext app adding customizations to it.

@tiwiex In the earlier problem, the doctype and database table was created for one site but the database table wasnt created for site B hence the table not found error.

1 Like