How to resolve the problems encountered when moving from local to server?
I'm assuming you're moving the files and database, as you state in your question:

Moving a site from MAMP should be pretty easy.  One thing you may be missing is updating $settings['trusted_host_patterns'] in your settings.php or settings.local.php

$settings['trusted_host_patterns'] = array(
   '^mysite\.com',
   '^.+\.mysite\.com',
   '^mysite\.local',
   '^.+\.mysite\.local',
 );


Another thing you may have forgotten to do is to clear the cache once you move the files and database.

Usually I use the drush command line utility and then from the docroot of the site, or the /sites/default directly run "drush cr".