We examine the statics and dynamics of vortices in the presence of a periodic quasi-one dimensional substrate, focusing on the limit where the vortex lattice constant is smaller than the substrate lattice period. As a function of the substrate strength and filling factor, within the pinned state we observe a series of order-disorder transitions associated with buckling phenomena in which the number of vortex rows that fit between neighboring substrate maxima increases. These transitions coincide with steps in the depinning threshold, jumps in the density of topological defects, and changes in the structure factor. At the buckling transition the vortices are disordered, while between the buckling transitions the vortices form a variety of crystalline and partially ordered states. In the weak substrate limit, the buckling transitions are absent and the vortices form an ordered hexagonal lattice that undergoes changes in its orientation with respect to the substrate as a function of vortex density. At intermediate substrate strength, certain ordered states appear that are correlated with peaks in the depinning force. Under an applied drive the system exhibits a rich variety of distinct dynamical phases, including plastic flow, a density-modulated moving crystal, and moving floating solid phases. We also find a dynamic smectic-to-smectic transition in which the smectic ordering changes from being aligned with the substrate to being aligned with the external drive. The different dynamical phases can be characterized using velocity histograms and the structure factor. We discuss how these results are related to recent experiments on vortex ordering in thin films with periodic thickness modulations. Our results should also be relevant for other types of systems such as ions, colloids, or Wigner crystals interacting with periodic quasi-one-dimensional substrates.