Content Management

Professional Practice

Deployment: best practices

(no mark for that in the practical assessment, just for your culture)

The non-professional way (version 1)

Solution

  1. Install WordPress using your hosting provider automated install
  2. Change settings
  3. Edit themes, plugins and pages from the administration interface

The non-professional way (version 1)

Problems

  • No control over the files
  • No recovery from a crash
  • A single environment for development, tests and production

The non-professional way (version 2)

Solution

  1. Install and work on your project locally
  2. Find the edited files and send through FTP/SFTP/SSH...
  3. Check if the site work or update configuration accordingly

The non-professional way (version 2)

Problems

  • What files did you change?
  • Do not override the server configuration with your local one
  • Do not override your files with updates or updates with outdated files

The semi-professional way

Solution

  1. Work locally
  2. Commit and push your files to a distant repository
  3. Connect to your server with ssh and pull your files

You can also use branches and tags on GIT to create different environments.

The semi-professional way

Problems

  • Something happens on the server, visitors can be there at the wrong time

The ultimate way

Solution

  • Use continuous integration / continuous delivery
  • Generate an artefact (an archive of the production files)
  • Provision a server and deploy
  • Run acceptance tests
  • Move the link from the old server to the new one (also works with folders and symlinks)

Database

The hardest part in moving a CMS.

Questions?

Deployment on the university system

Demonstration

Attempting the demonstration on Windows on the university system

Questions?

Next week

Work on your coursework

Questions?

Thanks for coming

  • Feedback welcome
  • Questions welcome
  • See you on Tuesday
Fork me on GitHub