To deal with the problem that the reactive power control capacity of doubly-fed induction generator(DFIG) wind farm has not been considered in the distribution network reactive power optimization process, reactive power optimization in distribution network considering reactive power capability limits of DFIG wind farm is studied. The influence of wind velocity prediction error on DFIG wind farm reactive power capacity is considered. The reactive power capability limits of DFIG wind farm are utilized as the constraint, and the DFIG wind farm is regarded as a continuous reactive power source to take part in the reactive power optimization in a distribution network. The active power loss and node voltage deviation minimization are chosen as the objective function in the proposed reactive power optimization algorithm. The particle swarm optimization(PSO) algorithm is used to solve this optimization problem. A 33-node distribution system is used as a test case to validate the algorithm.