php templates change location, create sql files