🦁
Angama
  • Introduction
  • WordPress
    • Overview
  • Administration
    • Server
      • Structure
      • Dev environment
    • CND (CloudFlare)
  • About
    • Naming agreement
    • Git
    • Continuous Integration
    • Launch notes
    • Transfer website
    • List of new pages
    • List of old pages with new blocks
  • User Tutorials
  • Systems
    • TourPlan
    • HubSpot
    • MS Frabic
Powered by GitBook
On this page
  • Updating databases and files
  • Update the databases
  • Update the uploads folder
  • Staging settings

Was this helpful?

  1. Administration
  2. Server

Dev environment

PreviousStructureNextCND (CloudFlare)

Last updated 3 years ago

Was this helpful?

  • has own db and own copy of the uploads folder (to allow write new images during development)

  • 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

(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

dev.angama.com
code.angama.com