- Click the green "Use this template" button on this Github page and create a new repository from the template.
- Clone the new repository (
git clone [email protected]:<owner>/<repository>.git
) - Copy
.env.example
to.env
and add the required constants - Install dependencies via
composer install
- Rename the theme folder, and update info in
style.css
,composer.json
, namespaces and textdomain - Start developing 😁
Follow the following steps to setup deployment via Deployer:
- If you haven’t already done so, install Deployer on your machine
- Set
application
,repository
,host
and other variables indeploy.php
- SSH into the remote server (
dep ssh
) - Create a
.env
file in theshared
folder and add the required constants - Run
ssh-keygen
and press enter a few times to generate a SSH key pair without a passphrase - Add the new SSH key to the SSH Agent:
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
- Add the public key to
authorized_keys_custom
:
cat id_rsa.pub >> ~/.ssh/authorized_keys_custom
- Add the public key to
known_hosts
:
cat id_rsa.pub >> ~/.ssh/known_hosts
- Go to your repository settings on Github.com
- Go to "Deploy keys" and add the public key (
cat id_rsa.pub
on remote server) - Go to Secrets and add
PRIVATE_KEY
(cat id_rsa
on remote server) - Go to Secrets and add
KNOWN_HOSTS
(ssh-keyscan <server-hostname>
on remote server)
Changes to the master branch will now be automatically deployed to the server. Or you can run dep deploy production
on your local machine to deploy.
You can use the following tasks to SSH into the database or pull or push the database and uploads from and to the remote server:
- Deploy to production:
dep deploy production
- Pull database:
dep db:pull production
- Push database:
dep db:push production
- Pull uploads:
dep uploads:pull production
- Push uploads:
dep uploads:push production
- SSH into server:
dep ssh
You can find more info on CLI usage on the Deployer website.