In this article, the most contribution is to propose a novel general stiffness model to analyze the stiffness of a wallclimbing hexapod robot. First, we propose a new general stiffness model of serial mechanism, which includes the linear and nonlinear stiffness models. By comparison, the nonlinear stiffness model is a variable stiffness model which introduces the external load force as a variable, obtaining that the nonlinear stiffness model can greatly improve the accuracy of stiffness model than linear stiffness model. Then, the stiffness model of one leg of the robot and the overall stiffness model of the robot are derived based on the general stiffness model. Next, to improve the stiffness of the robot, a new minimum and maximum stiffness are introduced, which provide with effective reference for the selection and optimization of the structural parameters of the robot. Finally, we develop a new wall-climbing hexapod robot based on selection and optimization of the structural parameters, then the experiments are used to show that the selection of structure parameters of the robot effectively improve the stiffness of the robot.