> For the complete documentation index, see [llms.txt](https://docs.angama.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.angama.com/administration/server-1/dev-environment.md).

# Dev environment

* [dev.angama.com](https://dev.angama.com) has own db and own copy of the uploads folder (to allow write new images during development)
* [code.angama.com](https://code.angama.com) has own db and a link to dev’s uploads folder (with write permissions, because code in the dev group on the server)

## Updating databases and files&#x20;

(as a root user)

### Update the databases&#x20;

(for dev & code)

1. mysqldump -u root -p{x} {originDb} | mysql -u root -p{x} {targetDb}
2. change site url & home url in the options table
3. replace the old urls to the new in all tables (e.g. via the Better Search Replace plugin)

### Update the uploads folder

(for dev only)

1. rm /home/dev-angama/www/html/wp-content/uploads/\* -rf
2. cp /home/angama/www/html/wp-content/uploads/\* /home/dev-angama/www/html/wp-content/uploads -r (will take some time, maybe 15min)
3. chown dev-angama:dev-angama /home/dev-angama/www/html/wp-content/uploads -R
4. sudo find /home/dev-angama/www/html/wp-content/uploads -type d -print0 | xargs -0 sudo chmod g+w (adding a writing capacity to the group, so the code user will be able to write)

### Staging settings

In site settings (admin area, for dev & code)&#x20;

1. change Google Analytics code to dev (!important)&#x20;
2. enable Staging mode with http protecting
3. in WP General settings change the client email to another to avoid getting them notified about technical issues on Code/Dev
