Skip to content

Migrating from ERPNext version 3

Pratik Vyas edited this page Jul 24, 2014 · 15 revisions

Install bench

cd /home/erpnext
git clone https://github.com/frappe/bench bench-repo
sudo pip install -e bench-repo

Setup ERPNext on the new bench

cd ~
bench init frappe-bench
cd frappe-bench
bench get-app erpnext https://github.com/frappe/erpnext				# Add ERPNext to your bench apps
bench get-app shopping_cart https://github.com/frappe/shopping-cart	# Add Shopping cart to your bench apps
bench new-site site1.local											# Create a new site
bench frappe --install_app erpnext site1.local						# Install ERPNext for the site
bench frappe --install_app shopping_cart site1.local				# Install Shopping cart for the site

Migrate you site to the new bench

```
bench migrate-3to4 /path/to/old/erpnext/folder
```

Continue with production deployment

If you're setting up the site for production, follow the new (production deployment instructions)[https://github.com/frappe/bench#production-deployment]. Also, the production settings document instructed to replace nginx.conf. You should replace it again with the following content before continuing.

worker_processes 1;

user www-data www-data;
pid /var/run/nginx.pid;
error_log /tmp/nginx.error.log;

events {
	worker_connections 1024;
	accept_mutex off;
}


http {
	include mime.types;

	default_type application/octet-stream;
	access_log /tmp/nginx.access.log combined;
	sendfile on;
	types_hash_max_size 2048;

	upstream erpnext {
		server 127.0.0.1:8000 fail_timeout=0;
	}

	include /etc/nginx/conf.d/*.conf
}