The problem with codeine is that it is very addictive -I know from bitter experience with my daughter who was given it in hospital when she was in agony following a botched operation. Non-steroidal anti inflammatories like diclofenac, which is sold under various names, can cause liver damage in some people if taken for a long time. If you are taking them, tell the pharmacist as you should not take aspirin at the same time as the blood may be thinned too much causing bleeding and ulcers.
The only problem with paracetamol is that it can cause bleeding ulcers and liver damage if taken in more than the recommended dosage.
All over the counter pain killers are safe when taken according to the manufacturers' or the doctor's instructions - but they tend to become less effective with long use which leads to the temptation to overdose.
Rub-in ibuprofen gels mean less medication gets into the bloodstream and are fine for occasional use.
Unfortunately, some people need pain killers for the rest of their lives - my daughter has a huge incisional hernia and internal lesions so she would not be able to function without her dosage of codeine but we have had a few horrible experiences when she 'topped ' up the prescribed tablets with things like Neurofen Plus or Paramol, which contain codeine.
You can google any medication and get a lot of information, but your doctor or pharmacist is probably the best person to ask.
I find warmth is good for pain and I believe, although I have never tried it, that some techniques such as Yoga and meditation are very helpful.