Skip to content

Wordpress deployment notes

Deploying the site

Backend Code - Wordpress Code

  1. Create tag of current site in master
    • git checkout master
    • git tag -a v1.0 -m "Initial version of site launched"
    • git push origin --tags
  2. Merge code to master.
    • git checkout master
    • git merge dev
    • git push origin
  3. Deploy backend code to server
    • ssh -i keyfile.pem {user}@{server}
    • Update server:
      • sudo apt-get update
      • sudo apt-get upgrade -y
    • Access the correct folder
      • /path/to/wordpress/folder
      • git pull origin master
    • Run composer update without dev.
      • composer update --no-dev -vvv - no dev packages and verbose.
  4. Login and activate plugins.
  5. Test API access.

Issues with deployment

  • Error PHP Fatal error: Uncaught exception ‘ErrorException’ with message ‘proc_open(): fork failed - Cannot allocate memory’ in phar
  • Add Permanent swap Add swap to Ubuntu

Adding API Theme

  • Adding a public theme to show when hitting the front page of our api.

Last update: April 13, 2020 15:25:03