Yes you can use coconut oil to treat a cold sore and it does work.
You can take coconut oil internally or apply the coconut oil directly to the cold sore to treat the cold sore.
When using coconut oil to treat a cold sore be sure to use organic, unprocessed coconut oil for the best results of getting rid of the cold sore using coconut oil.
To use coconut oil for treating a cold sore get the coconut oil warm enough to melt the coconut oil and then apply the coconut oil directly to the cold sore using a cotton ball or something else that you have on hand such as a cotton swab.
Then rub the coconut oil into the cold sore and then leave it on the cold sore for an hour or more and then apply some more coconut oil to the cold sore and repeat daily until the cold sore goes away.
In my experience the cold sore went away within a few days of using coconut oil on the cold sore.
You can also apply some ice or toothpaste to the cold sore to help it go away.