New Project Setup
Git repository
Firstly, check with other members of staff if a repository exists already. If you're creating a WordPress website, first clone the repository and remove the .git
folder. This will be the base application for your new project.
If a repository doesn't currently exist then please create one on our GitLab server by either adding it manually or whilst configuring a development web application.
ServerPilot
Our development websites run off ServerPilot, which allow us to quickly create manageable environments to build in. The setup process is as follows:
- Create a new app on ServerPilot. Use kebab-cased or a naked version of the live domain name
- The name of the ServerPilot app should be the subdomain for the development space, you'll need to add a DNS record for the subdomain in CloudFlare
- Ensure the database name and user is clear, makes sense and is difficult to guess, also ensure local and development database details are individual
- Update the relevant
.env
variables. Do not forget to add additional API keys or details later on all environments and ensure those details are appropriate to the environment
MAMP Pro
- Create a hostname that is consistent with ServerPilot subdomain but should end in
.test:8888
- Create a database (if appropriate) when creating a hostname
- The hostname path should lead to
public
directory for Laravel builds andhttpdocs
for WordPress - Add your
.env
variable - Ensure you are using the same PHP as on the production server but try to identify opportunities to use the website in a higher version of PHP. We should encourage clients to complete PHP upgrades.