sf::View view = window.getView();
view.move(0, 1);
window.setView(view);
Yes, you have to set the view when you modify it.
You don't need to modify the viewport to just move the view.
View creation and how they work:
https://www.sfml-dev.org/tutorials/2.5/graphics-view.php
https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1View.php