The key to understanding when to use was or were in a sentence is determining whether you need to use the subjunctive mood or not. A verb is in the subjunctive mood if it expresses an action or state that is not reality. For example, it might be hypothetical, wished for, or conditional.
“Was” and “Were” as Past and Subjunctive Verb Tenses
To better see what we are up against when deciding when to use was or were, let’s compare the past and subjunctive conjugations of to be side by side.