Reconfigurable intelligent surface (RIS), with its capability of passively beamforming, has aroused a surge of interest in recent years. In this paper, we investigate the joint phase alignment and phase quantization on RIS discrete phase shift designs for RIS-assisted single-input single-output (SISO) system. Firstly, the phenomena of phase distribution in far and near fields of RIS are differentiated. Then, for the purpose of phase alignment, the phase distribution law and its underlying degree-of-freedom (DoF) are analyzed, serving as the guideline of phase quantization strategies. Subsequently, two phase quantization methods, i.e., dynamic threshold phase quantization (DTPQ) and equal interval phase quantization (EIPQ), are proposed to optimize RIS phase shift discretization so as to strengthen the beamforming. DTPQ evidences its capability of achieving the optimal discrete phase alignment with a linear complexity, whilst EIPQ is a simplified method yielding sub-optimal solution yet with a constant complexity. Simulation results demonstrate that both of the proposed methods provide substantial improvements on power gain, stability, and robustness over traditional quantization method. In addition, as a product of RIS beamforming, the path loss (PL) scaling law under discrete phase shifts for RIS channel is unveiled for the first time. The field trials conducted at 2.6GHz and 35 GHz validate the favourable performance of the proposed methods in practical communication environment. This work may provide reference for the beamforming design of RIS-assisted links, especially in the near field.