WordPress Migrate 502 Bad Gateway nginx
A 502 Bad Gateway error can mean a lot of things, however, if you had the site working OK and then it stopped after changing things in the database, then it basically points to a problem with the way PHP is interpreting things in the database.


You'll need to look at your PHP configuration to find where the PHP error log is on the server and then look into that error log to understand what the problem is. 
There is a chance that the error is being recorded into Drupal's watchdog, usually available at admin/reports/dblog - if you can't view that inside the website you could use drush with the drush ws command to see items in watchdog, or just use SELECT * FROM watchdog ORDER BY wid DESC LIMIT 20; at a sql client to see the contents of the watchdog table.


The 502 error indicates there is a problem, but doesn't indicate the specific problem. If you post more details from your PHP error log it will be easier to help you fix it.