What you will need
- Bash
- Git
- PHP
How to structure the filesystem
- .gitignore
- bin/
- install
- certs
- update
- backup
- public/
- backups/
- wp-cli.yml
- wp-config.php
Installing wp cli
Downloading and configuring the latest WordPress
Updating the core, plugins and themes
#!/bin/bash
set -e
set -o pipefail
wp=/usr/local/bin/wp
wp_user=www-data
sudo -u "$wp_user" -- "$wp" core update
sudo -u "$wp_user" -- "$wp" core update-db
sudo -u "$wp_user" -- "$wp" plugin update --all
sudo -u "$wp_user" -- "$wp" theme update --all
Leave a Reply