In reply to Giorgos Sarigiannidis.

So, you don’t have to do the search/replace yourself if you don’t want to. WordPress will take care of replacing the URLs on the fly.

With regards to relative URLs, check out: https://make.wordpress.org/core/handbook/contribute/design-decisions/#absolute-versus-relative-urls and https://core.trac.wordpress.org/ticket/17048.