How can I bulk import into galleries?

So I don’t think it was an elegant solution, but this is what I did. I wrote a plugin that:

  • Looped through the galleries in the old database
  • Created a post for each gallery (I chose to use the envira gallery plugin) in the format used by a sample envira gallery post
  • Looped through all the images in each old gallery and attached them to the new gallery post with appropriate metadata

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)