This was originally posted as a comment on a Reddit thread of all things, but kind of too good to stay there.

WordPress is distributed under the GPLv2 license. The basic gist of that license is that you can do whatever you want with the code, but if you distribute any altered code, that code must be distributed with the GPL license as well. Meaning anyone you sell your code to can do whatever they want to do with it. This makes things like “one site licenses” and other restrictions unbinding or outright illegal.

If you do a consulting project for someone, the GPL license doesn’t come into play. Only if you want to sell or otherwise distribute your plugin on your website, etc, will your code need to carry the GPL or a GPL-compatible license.

First, what everyone agrees with is that if you copy and paste someone’s GPL code, even if you tweak it a bit, you are inheriting that code and the GPL will apply to it.

But let’s say you built your plugin from the ground up and it doesn’t borrow any code from GPL code. (Which is actually hard to do.) Most would say that the GPL will apply to your theme or plugin anyway since it relies on WordPress to run. The most cogent argument is by Mark Jaquith here[1] . Part of Mark’s argument:

Note that WordPress theme PHP files are not “templates” or “documents” in the way that most people think of those words (though the word “template” is sometimes used, it is not strictly accurate). They are PHP script files that are parsed and run on the same exact level and by the same PHP process as all the core WordPress files.

The particulars of the GPL would make exceptions if the theme was actually being loaded and parsed by the WordPress code, but it’s not. It’s being executed in tandem. Your plugin is really like a patch for WordPress in a nice little package vs. a separate application run by WordPress.

Some people might disagree with Mark and the rest of us, but for the most part their argument is “but I don’t wanna use the GPL, wah!” (Anyone is free to reply with a real argument if you are in this camp.)

There is another thing called a “split license” where you license the .php (and maybe some .js code) under the GPL and license static assets like CSS, images, .html files, and some .js files under a different (more restrictive) license. This way people can’t just redistribute your theme as a whole without replacing the non-GPL pieces first… kind of an extra little hindrance.

Most will agree that this is legal for you to do with your plugin or theme under the GPL. However, some organizations will have stricter rules, requiring a plugin or theme to be “100% GPL” (meaning all files included in the package) in order to be listed/etc. Most notably themes and plugins hosted at WordPress.org must be 100% GPL. Also, WordPress won’t recognize or work with designers and developers who don’t release stuff that is 100% GPL. So, for example, as soon as Woo Themes (a big theme developer) made all of their themes 100% GPL instead of split license, they got a big ol’ link on the WordPress.org homepage. And recently a designer who sold a split license theme was banned from speaking at a WordCamp.

The idea behind requiring that themes and plugins be 100% GPL is that making them split license betrays the intent of the GPL, which is to make it easier for people to do other things with your code, improve it, and generally make the world a better place.

The intent of the GPL is NOT to keep you from making money. Even though there are companies (including mine) selling themes and plugins on their site, this doesn’t mean those plugins are not GPL. You can still charge for a GPL plugin even though someone could buy it and turn around and give it away for free.

There are several reasons people will pay for a plugin or theme even though they might be able to find it for free elsewhere: * They want to get it from “the source” * They are worried about free versions containing malware or other nasties * They want support from who they are buying from (Paid Memberships Pro) * They want to receive future updates automatically (Gravity Forms) * The plugin relies on a 3rd party service (VaultPress)

Now there are basically two camps of people selling GPL themes on their sites.

Camp 1 embraces the GPL fully and will have GPL stickers in their footer and mention it whenever they get a chance. Camp 1 is more likely to give away versions of their code for free (maybe a lite version, or one minus addons, or even the full code) and use other business models to make money.

Camp 2 will admit that the plugin is GPL, but you’ll have to dig around to figure it out. They won’t mention it on their website at all. They might not even include a license.txt or similar comment in their code, which they are supposed to. They are basically reluctantly GPL and hope they can hide that fact to avoid people trying to get their stuff for free. But if you confront them about it, they will admit that their code is GPL to avoid the legal and community ramifications.

I’m in camp 1. I’m still not sure if it’s best for my bottom line. However, I’ll leave with this:

If you are going to work with WordPress and try to make money off of it. It makes sense to be in alignment with the people running the show, namely Matt Mullenweg. WordPress is a community project, but Matt and the WordPress foundation are all about 100% GPL and definitely against non-GPL themes and plugins. You probably should be too. If you don’t want to be, you should probably look into other code bases with different licenses and different people running them.

Update: The best argument I’ve found for the position that WP Plugins and Themes are NOT “derivative” works is by Chip Bennett here. Give it a read. He cites copyright cases and applies their decisions to the question of WP Themes and Plugins. If he sways you, it’s possible that Mark Jaquith’s comment will convince you back to the other side of the argument. 🙂 It’s a very interesting legal question.

Thoughts on GPL WordPress Plugins and Themes was last updated on July 31, 2013. Bookmark the permalink.