Regarding the use of better search replace to change the values in the database: I am not really sure what I should look for and what to replace it with. The same URLs I used before moving to the new apartment (that is http://www.my-wp-site.com and http://my-wp-site.com) are still valid.
In fact, since I made the fix if I navigate the site (which you can visit: http://www.nextabasso.it/) all the links to posts, images and other media seem to be in order. Am I missing something?
You are right I inserted those lines in /var/www/my-wp-site.com/public_html/wp-config.php. I would edit the post, but I’m not sure that is possible.
I will try to make the changes you suggest and report back.
Thank you both for your comments! @autotutorial you had it right, I was able to solve the problem by adding these two lines to /etc/apache2/sites-available/my-wp-site.conf:
define( 'WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] );
define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] );