This is so easy in FME Server 2017.0 using new functionality called Projects.
Check out this video showing how to create a project for the purpose of moving it from one FME Server installation to another:
http://www.screencast.com/t/QwUMqtYe5PvM
Check out this video showing how to export the project from one FME Server and import it another FME Server:
http://www.screencast.com/t/QTOMx2WG0Na
If you are using FME Server 2016 or previous, then you don't have access to Projects.
Here is what you can do instead:
https://knowledge.safe.com/articles/19635/fme-server-workspace-life-cycle-for-the-enterprise.html
This is so easy in FME Server 2017.0 using new functionality called Projects.
Check out this video showing how to create a project for the purpose of moving it from one FME Server installation to another:
http://www.screencast.com/t/QwUMqtYe5PvM
Check out this video showing how to export the project from one FME Server and import it another FME Server:
http://www.screencast.com/t/QTOMx2WG0Na
Also, if you need each environment to use it's own database, then you can define a database connection on each FME Server that shares the exact same name, but differs in the host and credential info. When a workspace is moved from one FME Server to the next, it will just connect to the database defined in the connection.
Relates to this somewhat:
https://knowledge.safe.com/questions/34975/moving-workspaces-between-fme-installs-tips-and-tr.html