Its not essential to have a pc hard wired but it does make setting up wi fi on other pcs easier if is connected by ethernet.
You need to access the router through its web ip address and set up the wi fi encryption.
This can be awkward doing it from a wi fi connected pc alone.
The easiest way would probably be to connect your pc to the router by ethernet cable and then set the wi fi connection up and encrypt it before moving the pc upstairs and then connecting by wi fi alone.