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 responses

  1. […] Home › Themes › Distributing Your WordPress Theme […]

  2. great series, lots to digest

    thanks for it

    Al

  3. […] 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 …More By Michelle Langston […]

  4. Great article … I cannot wait to finish updating my Oceania theme and try some of the distribution techniques you have listed in the article … 🙂

  5. […] on the Automattic Theme team blog, Michelle Langston has published a great primer on distributing themes whether they be free or commercially based. Besides the tips offered for distribution, the tutorial […]

  6. […] s1); })(); Tweet Over on the Automattic Theme team blog, Michelle Langston has published a great primer on distributing themes whether they be free or commercially based. Besides the tips offered for distribution, the tutorial […]

  7. 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)

  8. 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.

    1. 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. 🙂

  9. […] Distributing Your WordPress Theme, over at ThemeShaper, by Michelle Langston   […]

  10. […] Distributing Your WordPress Theme Distributing Your WordPress Theme […]

  11. The page where you actually upload your theme ZIP file to wordpress.org is a little hidden; you can find it here: http://wordpress.org/extend/themes/upload/

  12. What a fantastic tutorial! I was able to go through this in a night and almost complete a theme for one of my sites. Great job!

  13. 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.

  14. great series, lots to digest

    thanks for it

  15. 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.

  16. 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

  17. 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.

    1. 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.

  18. Santiago Avatar

    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.

  19. Great tutorial. 😀 I bookmarked this already.

  20. Pete Blake Avatar
    Pete Blake

    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.

  21. Started my way into wordpress theme, and I’m glad I found this tutorial, really helpful and a good way to start for me.