Try ERPNext Try Frappe Cloud Buy Support Partners Foundation

I changed my domain name in NameCheap and want to change in ERPnext too

Hi,

I’ve changed my domain name and but I’m not sure how to change it in ERPnext through the bench. This includes Let’s Encrypt when I’m running that it shows an error.

** Edit **
Pardon my oversight… I didn’t even notice that you are new to the forum. Please let me take this opportunity to welcome you to the community. Please visit often and share your experiences when they can help others that might be struggling. Thank you for your interest in the ERPNext project.

Okay, a quick fix for this is to use the bench “add-domain” command. It works by adding valid URL names to an existing site.

For example:

  • new installs using the easy install script always default the first site to “site1.local” as the site name.

  • I leave this name intact every time and use the following command:

bench setup add-domain --site site1.local [new.sitename]

(obviously change the [new.sitename] to your new URL from your NameCheap account)

Once this command is done you have to follow it with these commands to make it work:

bench setup nginx
sudo service nginx reload

Now you should be able to access your site using the new URL. Once you have this working then re-run the Let’s Encrypt setup for the new URL to get a valid security certificate again.

I used the default site name as the example here but you could add domain names to any valid site by replacing “site1.local” with your old site name.

Hope this helps. :nerd_face:

BKM

1 Like

Set up dns_multitenant on using bench (see docs on how to do this).
rename your site to your domain name. (mv command is a simple way to do this)
setup production mode (bench setup production frappeuser <-- the username where your bench installation resides)
sudo certbot --nginx