Need advice regarding publishing content on the web

Hi,
I created (had taken many years) a mix of a “book with snippets” for quick dev reference like CSS, PHP, Wordpress (initially for myself to quickly remember & copy snippets ) but I’m considering to publish it since it may be as well useful for other developers. My problem is I have no idea about stuff like the license. I would like to keep it free on my website, but perhaps in the future publishing it as a book. So I would appreciate some advice.

Maybe this forum is not the best place to ask this, but can you point me in the right place if is not?