Dev environment

Updating databases and files

(as a root user)

Update the databases

(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)

  1. change Google Analytics code to dev (!important)

  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

Last updated