Distributing Your WordPress Theme

You’ve created an amazing theme and now you want to share it with the rest of the WordPress community. In this lesson, we’ll walk through the best practices to follow when preparing your theme for distribution.

How Do I License My Theme?

WordPress is released under the GNU’s General Public License (GPL). The GPL is an open source license that allows any user to modify or redistribute the source code and all derivative works when such works are distributed, in order to make sure that the software — in the words of the Preamble to the license — “remains free for all its users”.

The “derivative works” category includes themes. This means that every WordPress theme you distribute (whether free or premium) must also carry the GPL license. Under the GPL, any user who downloads or purchases your theme is free to modify and distribute any part of it as they wish, without restriction. Full compliance with the GPL is required for all themes listed in the Free or Commercial Themes Directories on WordPress.org.

Here’s a great post with more information on how the GPL applies to WordPress Themes.

Does your theme include bundled fonts and third-party graphics and scripts? You’ll need to check that these assets use a license that is compatible with the GPL. The Theme Review Guidelines has a helpful list of GPL-compatible licenses for bundled resources.

Where Do I “Put” My Theme?

If you plan to distribute your theme for free, then it’s highly recommended that you submit it to the WordPress.org Free Themes Directory. There are two main advantages of adding your theme to the Free Themes Directory: a review from a real, live human on the Theme Review Team; and 2) the ability to reach the widest audience possible. Let’s elaborate a bit on these points.

100% Human Review
When you submit your theme to the WordPress.org Free Themes Directory, it’ll receive a thorough review from a member of the WordPress Theme Review Team. The Theme Review Team consists of dedicated WordPress community members who volunteer their time to review each submitted theme to ensure that the code meets the current guidelines. The Theme Review Guidelines were established to help improve the overall quality of themes in the Free Themes Directory, and to set general standards and best practices for theme development.

The length of the review process takes depends on how many themes are currently in the review queue, and how many issues the reviewer finds with your theme. If your theme does not pass the initial review, you’ll have the opportunity to make the necessary fixes and resubmit your theme for a second round, or a third, until it passes. It’s important to not get discouraged if your theme has to go through several rounds of reviews, just keep making fixes and resubmitting (and learning best practices), and eventually you’ll hit the mark!

Wide Audience
Once your theme is added to the Free Themes Directory, it’ll show up in search results both on the Directory’s front page as well as in users’ Dashboards when searching for themes under Appearance → Themes.

The Automattic Theme Team scouts the Free Themes Directory on occasion, looking for themes that would be a great fit for WordPress.com users. There’s a possibility that we could pick your theme!

So, it’s pretty obvious by now that adding your theme to the Free Themes Directory is one of the best ways to make your work readily available to other people!

Premium Themes
If you plan to sell your theme, you’ll likely do so through your own website or through another premium theme marketplace. Even though your theme won’t be subject to review by the Theme Review Team, it’s a good idea to adhere to the Theme Review Guidelines and to follow best practices as much as possible. This way, you’ll ensure that the product you’re selling to your customers is safe, up-to-date, and high-quality.

The WordPress.org Commercial Themes Directory is a great way to promote your commercial themes.

How Do I Prepare My Theme For Distribution?

When you build a theme for the wider community, you must take care to make your theme as adaptable as possible. For example, some users might only add one item to their menu, while others might add ten. Some users might write multi-line titles for their posts or widgets. These are just a few scenarios. Your theme must be able to adapt as much as possible to ensure that it remains usable by a wide audience.

It’s impossible to predict and prepare for every single use case, but here are a few common things to think about when developing:

  • Make sure your theme can endure a wide range of content situations without breaking — long post titles, long widget titles, many menu items, etc.
  • Make sure your theme is translation-ready.
  • Add a right-to-left (RTL) stylesheet for those whose languages read from right-to-left.
  • Make sure the fonts you use support characters from a wide number of languages.
  • Avoid hard coding, and respect user settings as much as possible.
  • Avoid using ornamental graphics (such as a post title or widget title background) that break if text gets too long or too short. In fact, use CSS3 effects in favor of ornamental graphics wherever possible. These days, you can create rounded corners, drop-shadows, gradients, and more with CSS3.

This is is not exhaustive, but it’s enough to get you started. If you develop in accordance with The Theme Review Guidelines, test with the Theme Unit Test, and run the Theme Check Plugin, you’ll be well on your way to making sure your theme is fit for the masses!

Ongoing Maintenance and Support

It’s recommended that your theme have a “home” on the web. Whether this is a section of your personal site, or a site you set up just for your theme, it’s a useful resource for your users. You can provide documentation, a link to a demo, the latest news and theme updates, and of course, information telling users where they can get support. Some theme authors choose to offer support on the WordPress.org Themes & Templates support forum, and others offer support on their own website.

The Theme Review Team reviews all updated versions of themes already in the Free Themes Directory to ensure that the themes continue to meet the guidelines, and any that were added since the first review.

With that, you’re now ready to jump into the wild world of WordPress Themes. I hope you’ve enjoyed this tutorial and have learned something. If you have any suggestions on how we can make it better, please leave a comment!

How To Create a WordPress Theme

This post concludes the The ThemeShaper WordPress Theme Tutorial: 2nd Edition that will show you how to create a powerful WordPress Theme from scratch. Read it from the beginning and code yourself up something awesome.

  1. WordPress Theme Tutorial Introduction
  2. Developing Theme Sense
  3. Theme Development Tools
  4. Creating a Theme HTML Structure
  5. Template and Directory Structure
  6. Setting Up Your Theme Functions
  7. Secure Your WordPress Theme
  8. The Header Template
  9. The Index Template
  10. The Single Post, Post Attachment, & 404 Templates
  11. The Comments Template
  12. The Search Template & The Page Template
  13. The Archive Template
  14. The Sidebar Template & The Footer Template
  15. Reset-Rebuild Theme CSS & Define Your Layouts
  16. Custom Background & Custom Header
  17. Distributing Your WordPress Theme

24 thoughts on “Distributing Your WordPress Theme

  1. Pingback: Distributing Your WordPress Theme

  2. Pingback: Tony Matthews: Creating Your Website With WordPress | WordPress.tv | Open Knowledge

  3. Pingback: Nice Primer On Distributing Themes

  4. Pingback: WPTavern: Nice Primer On Distributing Themes | WordPress Planet

  5. Affilie says:

    Seems that you did not validate my comment.
    But I really found your article interesting and wanted to take part in the discussion.
    Maybe next time.
    (A French reader :p)

  6. Pingback: The Ultimate Collection of WordPress Theme Design & Development Resources : WPMayor

  7. Hello Michelle,

    Thank you for providing this tutorial for WordPress theme builders.

    I see in the first paragraph here: ‘in order to make sure that the software — in the words of the license — “remains free for all users”.’

    Is that actually a quote from the licence? I did a quick search through the license, and could not see that wording.

    The reason I went looking is that those words miss the point of my reading of the license, which is “users retain freedom to use the software in the ways that they need to”.

    I decided to clarify that because I find that the wording you chose ( or is actually in the license? ), “remains free for all users”, really does not convey the point of the license.

    p.s. We met briefly in Winnipeg at King’s Head when the theme team visited.

    • Hi Dan! Thanks for your comment, and I remember meeting you at the King’s Head. :)

      I quoted that line from the first paragraph in the Preamble section of the license. I’ve updated the post to make that clear. The actual wording should be “free for all its users”, and I’ve updated the post to reflect that as well.

      The entire sentence in my post reads: The GPL is an open source license that allows any user to modify or redistribute the source code and all derivative works when such works are distributed, in order to make sure that the software — in the words of the Preamble to the license — “remains free for all its users”.. This is basically the same as your interpretation of the license. :)

  8. Pingback: Just read issue 80 of the wpmail me… « GlacierAgWeb

  9. Pingback: Die besten meiner geteilten Links auf Twitter im November 2012 | pixelstrol.ch

  10. emj says:

    According to the W3C website, the home page code has 4 errors. Any idea how to fix them? I used all of the default info from this tutorial.

  11. When I started on this project in November there was a message somewhere in the tutorial pages about sharing outcomes. Now all there is are pages reminding people how to be obedient code monkeys following GPL and commercial lienses.

    It’s a shame to see such crass American commercialism invade the realm of even notionally open source projects.

    All the same, I owe a debt of gratitude to Theme Shaper for my CMS. So thanks, if I can say that with any meaning not derived from coin crossing someone’s palm.

  12. In the sample data, there’s some table markup in the layout test post and the comments test, but the markup is not ideal, there is no element
    should be:
    table > thead > tbody, instead it just uses table > tbody

  13. This license is still confusing me. So if i buy a theme from market place, Can i modify and resell it. Or Can i get a free framework like hybrid, bones and build a new theme and sell it. How does premium fit the GPL.

    • Hi Carrie! Great questions. If you buy a theme that is licensed under the GPL, you are free to modify it as much as you like, and distribute it in whatever manner you like. This includes selling to a wide audience (which is a form of mass distribution). People who download or purchase your GPL-licensed theme are also free to modify, distribute, and sell it with no restrictions. I hope this clears things up.

  14. Santiago says:

    Amazing tutorial.

    Straight to the point, explains the most important part of coding a WordPress theme: WHY.

    I got into theme development with the first tutorial and this update was just what i needed.

    Thank you so much.

  15. Pete Blake says:

    Such a clear concise tutorial, not bogged down in jargon and confusing terms and beautifully presented. I’m not used to php but have started the recommended “PHP For the Absolute Beginner”.

    I look forward to future tutorials from the themeshaper team.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s