The critical current density of YBa 2 Cu 3 O 7 - δ (YBCO) thin films strongly depends on the surface properties of the substrate. We modify the surface of SrTiO 3 single crystalline substrates using a 30 keV focussed beam of gallium ions. After characterizing the created patterns on the substrate by atomic force microscopy, thin films of optimally doped YBCO are deposited by pulsed laser deposition. By means of quantitative magnetooptical measurements it is found that a proper irradiation process can enhance the critical current density of the deposited superconducting film. The film growth on the irradiated substrate can lead to a higher and controlled defect density and thus to a modified distribution of effective flux line pinning sites in the superconductor.