While I was at university I developed some PHP libraries which I intended for personal use. I used them in a few personal projects.

When I joined my current job we created a commercial product which required the same functionality. I proposed using my libraries as they were familiar to me. We did.

Since then I have modified and improved the libraries in the last couple of years (all in my own time) and want to release them as open source under the GPL licence.

Now under the GPL licence you cannot use the libraries as part of commercial software, so does me doing this now in any way affect the commercial software or their protection? Am I free to release these libraries in this way?

Thanks in advance!

  • Either you are the author, or your employer is because your contract transferred your rights to them. In either case, the author is utterly free to re-release whatever he owns under a completely different license, no matter how wildly incompatible they are. It's other people whose actions a software licence restricts. Jan 26, 2015 at 14:15
  • Have you even bothered to read the GNU FAQ? There is no prohibition on using GPL software in a commercial application. Jan 26, 2015 at 19:14
  • I'll have you know I have read the FAQ - I am aware there is no prohibition in that. However my understanding was that utilising GPL software in an application obliges the application author to release the entire code under GPL. My question is if it applies retrospectively
    – Raiden616
    Jan 28, 2015 at 10:22
  • And I don't believe this question is a duplicate. Firstly the "already has an answer" question is a completely different question - don't understand the person that linked to it. Secondly, my question was specifically about my rights given that I work for the company utilising my software which I now want to release separately.
    – Raiden616
    Jan 28, 2015 at 10:24

1 Answer 1


The license is intended to protect your copyright and interests, not to take them away.

As the only author of the library, you are free to relicense it under whichever scheme you wish, including for usage in commercial products. Indeed, it's not that uncommon. For instance, PolarSSL is released under GPLv2, but a license can be bought for usage in closed source code.

If the library is used internally (e.g. server-side) and never distributed, the relicensing thing is not even necessary, for GPLv3 at least.

The only issue would be if you used external code. In that case, you must take the necessary steps to comply with the respective license.

  • Ah that's good to know - I was trying to find an example of a GPL licenced software package that was sold for use in closed source code. That's very helpful, thank you.
    – Raiden616
    Jan 26, 2015 at 15:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.