An optical fiber Fabry-Perot sensor to monitor the solid-liquid and liquid-solid phase changes in n-octadecane is investigated. The sensor probe is fabricated by splicing a short section of a hollow core fiber between two single-mode fibers. Light from a broadband source launched into the probe experiences multiple reflections as it travels towards the cleaved end of the probe immersed in the material sample and then back to the detector, creating an output interference spectrum with multiple interference dips. The phase change of the material sample in the vicinity of the fiber probe results in changes of various parameters acting upon the probe (such as temperature, strain or bending) which in turn cause changes in the output interference spectrum. By analyzing the changes in the output spectrum of the probe, such as spectral shift of a selected interference dip, the phase change within a material sample in the vicinity of the fiber probe can be accurately detected. This work is useful for providing a better understanding of the phase change mechanism in phase-change materials (PCMs) and for in-situ phase change detection in PCM-based energy storage systems.