I have answered the question within the question! Bad feline headaches cause head pressing because it alleviates the pain. So what causes feline headaches? Here are some examples.
The gastro-intestinal parasite trichinosis causes symptoms of muscle pain, headaches and joint pain. This parasite is acquired by ingesting undercooked pork that contains the encysted larvae of Trichina spiralis. Fifteen percent of people living in the US have at some time acquired this disease.
Sinusitis in cats can cause headaches amongst other symptoms.
Cats with impaired liver function can have a range of symptoms including head pressing which is a sign, as mentioned, of having a bad headache. The cat actually puts his forehead against a wall to try and alleviate the pain.
Portosystemic shunts, are an inherited anatomical defect present at birth. Specifically an abnormal portal vein bypasses the liver and takes blood directly to the heart. Food nutrients and waste products are not processed by the liver. Ammonia products build up inside the cat’s system. The illness’s symptoms include head pressing, seizures and circling and also include weight loss, vomiting, diarrhoea and excessive drooling.
Source: Myself nowadays, but details from Cat Owners Home Veterinary Handbook on various pages.
P.S. Don’t laugh at a cat pressing his head against a wall and make a joke about it on the internet — please.
SOME PAGES ON PARASITES: