- Install WordPress
- In the /wp-content/themes directory, create a folder that matches your theme's text-domain (make sure permissions are set to 755)
- From your terminal, SSH into the server: ssh -p port user@IP
- port represents the port number
- user represents your CPanel username
- IP represents your IP address
- Generate the SSH key with the following command: ssh-keygen -t rsa -b 4096 -C "username@example"
- username represents the cPanel account username
- example represents the domain name
- After you run this command, the system will prompt you to enter a passphrase. Do not enter a passphrase, and press Enter to continue.
- To confirm that the key exists and is in the correct location, run the following command: cat ~/.ssh/id_rsa.pub
- The output should resemble the following example, where AAAAB3Nza... represents a valid SSH key: ssh-rsa AAAAB3Nza...
- Copy the entire key and keep it aside
- Log into CPanel and navigate to "SSH Access"
- Click "Manage SSH Keys" and "authorize" the public key
- Navigate to your repo
- Click "Settings"
- Click "Deploy Keys"
- Click "Add Deploy Key"
- Give your key a title
- Paste in the full SSH key
- Check the box to "Allow Write Access"
- Click "Add Key"
- Click "Git Version Control"
- On the right hand side, click "Create"
- Enter the clone URL of your repo. It should be in the following format: ssh://[email protected]:443/GITHUB-USER-NAME/REPO-NAME.git
- Enter the path to where the repo should be cloned on the server. This should be the theme directory that you set up at the beginning.
- Click create
- From CPanel, click "Git Version Control"
- Click "Manage"
- Navigate to the "Pull or Deploy" tab
- Click "Update from Remote" to sync files on the server with the remote repo