Does my portfolio need to go live?

I’m wondering if my portfolio projects need to go live. Can I just have them posted on github? My two projects require database.

It depends on what you mean by “needs to”. The instructions say:

Once you’re done, submit the URL to your working project with all its tests passing.

That means that it has to be “working”, someone needs to be able to visit and see the site, not just a collection of code. But you could host your static apps on git pages, and put a link to the repo in the app.