So from what I understand a product under GNU General Public License needs to stay under GNU General Public License (with references to the previous copyright owner).

So if you sell it then the full project included code goes to the buyer. But I don’t want that my buyer get all the power to sell my customizations

If you make a website under GNU General Public License:

Can you make it your property and hold all the code private, if you don’t sell the full like in question 2. Can you ask for money to use it? (user License). Can you ask the future user for money for to customize it? (the hours that I spend changing the customization).

  • The GPL generally applies to code, that is, to software. Could you clarify what you mean by "if you make a website under GNU GPL", particularly given that you've said you intend to make your GPLed code by modifying someone else's? Or better still, remove the reference to a website and let's just talk about software.
    – MadHatter
    Commented Feb 21, 2017 at 7:22
  • In my case the customization of a CMS system like Drupal and WordPress . Making a website for a buyer and making custom modules. But in drupal case its under GNU GPL . And I don’t want to give my code to the buyer. That’s the reason of the questions. Also I understand that the open source community needs something back. So some of my modules I will open the code to the community. I now that people make money this way so my question is it legal under GNU GPL. of course I will name al the copyrights owners of drupal and the other GNU GPL code I use Commented Feb 21, 2017 at 19:15

2 Answers 2


Firstly, and foremost, IANAL/IANYL.

That said, as I understand this question, you have been asked by a third party to do some commercial website development, the website to be hosted on drupal, and the work to include some modifications to the drupal system itself (yes, I know you said ... or wordpress, but let's assume a stationary target).

According to the bottom of this page, drupal 8 (the current version) is distributed under GPLv2. This gives us three separate issues: content you create for publishing via your modified drupal system, your modifications to the drupal core itself, and drupal modules you create.

Firstly as I understand it, content you create for your client is not covered by drupal's licence. The basis on which this work is available to your client is up for agreement between the two of you. If you don't want your client to be able to sell it on, and you want to be able to reuse it yourself, you will need to ensure the agreement conveys only a non-exclusive, non-transferable right to use a single copy of this content. In some jurisdictions, you may need to address the issue of works for hire. Frankly, you should get a lawyer.

Secondly any modifications you make to the drupal core are pretty clearly covered by the core's licence. GPLv2 section 2b says that

You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: [...]

b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.

This distribution or publishing happens when you give your core modifications to the client. As I understand it, drupal is written in PHP, which is an interpreted, not a complied language. If you give your core modifications to the client, to run on his/her own server, you must license the new, modified drupal core under GPLv2, and (s)he may then modify, copy and distribute it as long as (s)he also obeys the obligations of GPLv2. If you can persuade the client to pay for modifications which you host in perpetuity, then I think you may keep them secret; but I also think your client would be an idiot for signing such a contract.

Thirdly, modifications you make to drupal by way of custom modules are difficult. Even if drupal were a compiled product, the licence status of code that is linked into GPLed code remains an open question; some say that it constitutes a derivative work, and therefore the GPL covers your modifications, while others say that it doesn't. That drupal is an interpreted, not a compiled, product certainly doesn't make things simpler, and may complicate them more. My personal feeling is that you are on safest ground assuming that your module is covered by drupal's licence; therefore you should treat it the same as modifications to the core, and either give it to the client under GPLv2, or host it yourself - but that is just my uninformed feeling on the matter.


The previous answer is correct, though I'd suggest a refinement about "content". I.e. for anything that you "configure" via Drupal's admin interface. As a sample, think of using the Rules module, which is like a GUI to implement business logic in a language that looks like a macro language, and the results of that are stored in your Drupal database. If you want, you can export anything you created with this module, and eventually also import it again in another site.

The same applies for all sorts of other things, such as custom reporting (using the Views module), or all those other fancy Drupal modules that are "entity based", and which come with import / export facilities: Group, Message, Flag, etc ... And even things like content types and field definitions can be considered like that also. In the end, probably anything that is supported via the Features module (to move configurations between 2 sites).

For all the above things, IMO that is all to be considered as variations of "content", whereas somebody has the know-how to click together whatever it takes, and uses the Drupal UI (and/or any of its modules) to get those things stored in the Drupal database. But whatever you can import/export is to be considered as something for which the GPL does not apply. Because if it would, how would that differ from using (eg) MS Word or Libre Office to create a .DOC file (ie: who is the owner of the .DOC file? the author of the .DOC I'd think!).

Hosted solution as an alternative

A solution that you could use as an alternative, where you avoid 100% of all the typical GPL obligations that you don't want, is to package what you're offering as a hosted solution ... Similar specs for the Drupal site to be created, but you agree (upfront!!!) with the customer that they will get access to it via some sort of hosted solution, where you are in charge of hosting it for your customer.

The crucial difference here is that you do not have to "distribute" any Drupal software to your customer, while using GPL software also implies that nobody can force you to distribute (or disclose) any customizations you made to a GPLed software.

However, if you distribute such software 1 time to somebody (eg your customer), then "you" are not allowed by the GPL license to impose a restriction to that like "that somebody is not allowed to distribute the distributed version to anybody else".

  • I think I already made the point about hosting the site to avoid triggering obligations, but I agree with you!
    – MadHatter
    Commented Feb 22, 2017 at 16:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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