
New Website Setup
Cloudways Server
- Install Live Site & Create Staging site
- Install Varnish, Redis, Memcached
- Activate SSH
- Add RSA keys to server for Master, Live, and Test Site
- Upgrade to PHP8 and MariaDB 10.4 or MySQL 8
- Activate Local Backups
- Whitelist IP address of personal computer
Live Site add password until ready to launch
Login through SSH
$ htpasswd -c .htpasswd kris
Enter Password and add it to project notes
$ chmod 644 .htpasswd $ PWD=`pwd` $ echo -e "\n#Protect Directory\nAuthName \"Dialog prompt\"\nAuthType Basic\nAuthUserFile $PWD/.htpasswd\nRequire valid-user\n" >> .htaccess
Live Site Other Settings
- HTTPS Redirection Force https://
- php.ini – time_zone (America/Los_Angeles)
Staging Site
- Disable Varnish
- php.ini – show errors
Development Environment
- Add Live and Test Servers to RClone
- Create Volume Folders
- Create Mount scripts
- Verify they work
- Create Working folders inside of Clients:
- Client Name
- Assets
- Notes
- Website
- Client Name
PHP IDE – PHPStorm
- Create new empty project inside of Clients/<Client Name>/<Website>
- Add Git Version Control
- Install .ignore plugin into PHPStorm if missing
- Add .gitignore file with WordPress template, and save.
- Add deployment settings to SFTP Test Server
- Upload changed files automatically > On explicit save action
- Delete remote files when local are deleted
- Preserve original file permissions (SFTP only) > Yes
- Tools > Deployment > Download From Server
- Add PHP Framework
- Make Initial Commit
- Commit and Push to Github