Weird issue with database migration and SSL links

Found a problem. Basically there were 2 options that forced my permalinks to https:

  1. Settings > General: change the site url from https to http.
  2. SEO by Yoast plugin, under section permalinks needed to change Canonical Settings to force HTTP.