Build Overview

How to Start

Decide on the overall structure of the site. Are there password protected parts of the site? Is there an Admin area etc.

Decide on the pages in the different parts of the site. Make lists of these in a text file.

Start Git / GitHub Early

There is no reason to start tracking with Git immediately but it is a good idea to start before adding components that you want to be in the .gitignore file. This is because it is simpler to start tracking a project with Git and Github and then add a .gitignore file.

Start writing .gitignore file. Have a .env file in it, vendor/, composer.phar....

Including Files

Get a basic working framework for CSS, JavaScript and various PHP files. Then extend it but try not to change the basic functionality.

CSS

JavaScript

PHP files

Password Protection

Implement this early. Consider whether it can work on the development and production servers. Including files is likely to be an issue: see that section

Development vs Production Server

Try and make these as similar as possible. Try and workout which things will not work on both and get a strategy to deal with that.

Webhooks, where a request is made to your server, will not work on a development server which is not configured to receive requests other than from the machine the server is on. So, this part of the process will get out of sync.

Directories and files such as SQLite database files and folders used for file uploads from the website may be problematic to move with FTP eg. FileZilla. Put SQLite database in a dirctory with nothing else in as both the database file and directory will have their owner changed to www-data and therefore present these difficulties. At least you will not be moving other files in and out of the database directories.

header.php

Do not include the title element and closing tag. This is because each page will have a different title and also page specific additions to the head element can be made.

Multiple Style Elements

You can have multiple style elements in the head element. So, you can incorportate "main.css" into header.php and then add more CSS inside any particular page.