Breakdown of Foi só aquecer o óleo de coco que ele ficou líquido.
ele
he / it (referring to a masculine noun)
de
of, from / in (with times of day)
que
that (conjunction introducing a clause)
ficar
to become, to get (+ adjective)
Questions & Answers about Foi só aquecer o óleo de coco que ele ficou líquido.
How does the Foi só... que... pattern work here, and what if I want to mention who heated the oil?
Foi só + infinitive + que + past tense expresses an immediate trigger in the past: as soon as the first action happened, the second followed right away (literally, "It was only to heat... that it became..."). Here, aquecer has no subject because it doesn't matter who did the heating. If you want to say who did it, just place the subject right before the infinitive: Foi só eu aquecer o óleo de coco que ele ficou líquido or Foi só nós aquecermos o óleo de coco... (using the personal infinitive).
Since the English translation says "for it to turn liquid," can I use para instead of que?
Yes, both que and para are very natural in this foi só structure, as long as you match the verb form to the connector. With que, you use a conjugated past-tense verb: ...que ele ficou líquido. With para, you use the infinitive instead: Foi só aquecer o óleo de coco para ele ficar líquido. Both versions carry the same meaning.
Why is ele used for "it" in que ele ficou líquido when Portuguese usually leaves "it" out?
In everyday Brazilian Portuguese, ele and ela are commonly used as subject pronouns for inanimate things when referring back to a specific noun just mentioned—in this case, o óleo de coco (which is masculine). Including ele is extra helpful here because the first action (aquecer) was done by an unnamed person, so ele makes it immediately clear that the subject of the second clause is the oil itself. Dropping it (...que ficou líquido) is also grammatically fine, just a bit less conversational.