How to Make a WordPress Theme and Sell It in 2026
Lots of people who work with WordPress have the same thought at some point. “I could make a theme and sell it.” A theme is a product you build once and can sell many times. But the work does not stop when the design looks good. You also need to test it, pick a licence, find a place to sell it and look after the buyers.
This guide walks you through the whole path in plain steps. You will see how to plan a theme, build the files, test them, stay on the right side of the licence rules and choose where to sell in 2026. If the word “theme” is still a bit vague to you, read our post on the difference between a custom WordPress theme and a template first.
Plan Your Theme Before You Build It
A theme that tries to suit all sites is hard to sell. The market is full of “do it all” themes with years of reviews behind them. A new seller does better with a clear group of buyers in mind. So start with a plan, not with code.
Pick one kind of site and learn what it needs. A theme for a small law firm needs team pages, a clear phone number and a calm look. A theme for a food blog needs big photos and a neat recipe layout. Write down the five or six page types your buyer will use, and sketch each one on paper.
Next, pick the type of theme. In 2026 you have two real options:
- Block theme. This is the modern kind. Templates are built from blocks, and the buyer edits them in Appearance → Editor. Styles live in one file named theme.json. Most new themes are made this way.
- Classic theme. This is the older kind, built from PHP template files. The buyer changes it in Appearance → Customize. It still works, but it takes more code to build and to keep up.
For a first theme, a block theme is the easier road. You write less PHP, and the buyer can change more with no help from you.
Set Up a Safe Place to Build
Never build or test a new theme on a live site. One bad line of PHP can bring up a blank white page for each visitor. You need a private copy of WordPress where it does not matter if things break.
You have two good ways to do this. The first is a local site that runs on your own computer. The second is a staging site, which is a private copy on a web server. Our guide on how to set up a staging site in WordPress shows the steps. If you ever need to test on a site that has real content, take a full backup first.
Then get the test site ready for theme work:
- Turn on debug mode. Open the wp-config.php file on your test site and set WP_DEBUG and WP_DEBUG_LOG to true. Errors will then be saved in wp-content/debug.log. Our post on what WP_DEBUG is and how it works explains each line.
- Load test content. WordPress.org offers a free file named Theme Unit Test data. Import it at Tools → Import. It adds long titles, odd images, nested lists and deep comment threads, so you can see where your layout breaks.
- Use a current PHP version. Build on a PHP version that is still supported, and note the oldest one your theme works with.
Build the Theme Files Step by Step
A WordPress theme is just a folder of files. It lives in wp-content/themes/ on the site. WordPress reads a few key files to learn the theme’s name and how each page should look. A block theme needs only a small set to get going.
- Make the folder. In wp-content/themes/, add a new folder with a short name in lower case, such as “harbor-law”.
- Add style.css. This file starts with a comment block that holds the theme details. Fill in Theme Name, Author, Description, Version, Requires at least, Tested up to, Requires PHP, License and Text Domain. WordPress shows these at Appearance → Themes.
- Add theme.json. This file sets your colours, fonts, font sizes, spacing and page width in one place. The block editor reads it, so your buyer sees the right choices in each block. Learn more in our guide to theme.json in WordPress.
- Add templates. Make a folder named “templates” and put index.html in it. This is the one template a block theme must have. Then add more, such as single.html for posts, page.html for pages, archive.html for lists and 404.html for missing pages.
- Add template parts. Make a folder named “parts” for the bits you use again and again, such as header.html and footer.html.
- Add patterns. Make a folder named “patterns”. Each file in it is a ready-made layout, such as a price table or a team grid.
- Add a screenshot. Save an image named screenshot.png, 1,200 by 900 pixels, in the theme folder.
Once the base files are in place, turn the theme on at Appearance → Themes. You can then shape the templates by eye in Appearance → Editor. When you are happy, open the options menu in the Site Editor and pick Export. WordPress hands you a zip file with your changes saved into the theme files. Keep any PHP you add in functions.php small. Features such as custom post types belong in a plugin, as our post on functions.php vs a custom plugin explains.
Test the Theme Until It Is Ready to Sell
Buyers will use your theme in ways you did not plan for. They will add long menus, huge images and plugins you have never heard of. Testing is how you find the weak spots before they do. A theme with bugs leads to refunds and poor reviews, so give this stage real time.
Check the code. WordPress.org has a free tool named Theme Check. It scans your theme for missing files, unsafe code and old functions. Fix each warning, even if you do not plan to list the theme there.
Check each screen size. View each template on a phone, a tablet and a wide desktop. Menus, tables and wide images are the parts that break most.
Check access for all users. Move through each page with only the Tab key. Each link and button should show a clear focus ring. Text should stand out from its background, and each image in your patterns should have alt text.
Check speed. Load only the fonts and scripts you need. A light theme is a strong selling point, and it helps your buyers with search rankings too.
Check updates and child themes. Make a child theme and confirm that it can change your styles and templates. Buyers use child themes to keep their edits safe, as we cover in what a WordPress child theme is. Also test with WooCommerce if shops are part of your market.
Sort Out the Licence and the Legal Side
This is the step that new sellers skip, and it can cause real trouble later. WordPress is released under a licence named the GPL. A theme is built on top of WordPress, so the PHP code in your theme must use the GPL or a licence that fits with it.
The GPL does not stop you from charging money. You can sell a GPL theme at any price. What it does mean is that a buyer is free to change the code and share it. For this reason, most theme shops do not really sell the files. They sell updates, support and ease of use, and those are things a copy from a stranger does not come with. Our post on what a GPL WordPress theme means goes deeper.
There are three more points to check before you launch:
- Images and fonts. Each photo, icon and font you ship must have a licence that lets you resell it. If you are not sure, swap it for one you made or one that is clearly free to share.
- The name. Do not use the word “WordPress” in your theme name or your domain name. The short form “WP” is fine.
- Your terms. Write a short page that says what the buyer gets, how many sites the price covers, how long support lasts and how refunds work. We are not lawyers, so ask one to read your terms if you plan to sell at scale.
Choose Where to Sell Your Theme
You have three main routes to market. Each one has a different mix of reach, control and cost.
The WordPress.org theme directory. Themes listed here must be free and fully GPL. So how does this help you sell? You list a free version, and inside it you point to a paid version with more patterns, templates or support. The reach is huge, as the directory shows up inside each site at Appearance → Themes → Add Theme. Your theme has to pass a review, and the rules on upsell notices are strict.
A theme marketplace. Large marketplaces bring ready buyers and take care of payments and tax. In return they keep a share of each sale, and they set rules on price and design. A review team may reject a theme that looks too much like others. This route suits you if you want sales and do not want to run a shop.
Your own site. You keep the whole sale and you own the list of buyers. You can run the shop on WordPress with WooCommerce. Go to Products → Add New, tick Virtual and Downloadable, and attach the theme zip file. The hard part is traffic. You will need a demo site, good content and time for search engines to find you.
Price, Support and Update Your Theme
A sale is the start of your work with a buyer, not the end. People pay for a theme that keeps working after the next WordPress release. So plan your price and your support at the same time.
Set a clear price. Look at ten themes in your niche and note what they charge. Many sellers offer a one-site plan, a plan for more sites and a yearly renewal for updates and support. A yearly plan gives you steady income to fund the upkeep.
Write the guide first. Make a short setup guide with screenshots: how to install the theme, import the demo, set the menu and change the colours. Good docs cut support requests more than any other single thing you can do.
Ship updates on a schedule. Test your theme against each new WordPress beta release. Keep a changelog file so buyers can see what changed. Raise the version number in style.css with each release.
Give support a home. Pick one channel, such as a help desk form, and state your reply time. Save your best answers and turn them into help pages.
Final Thoughts on Making and Selling a Theme
Making a WordPress theme to sell is well within reach in 2026. Block themes have cut the amount of code you need, and the Site Editor lets you design by eye. The steps are clear: plan for one kind of buyer, build on a safe test site, add the core files, test hard, use the GPL and pick a place to sell.
The sellers who last are the ones who treat a theme as a service. They keep it light, write clear guides, answer buyers and ship updates on time. Start small with one niche theme, learn from your first buyers and grow from there.
If you get stuck on a theme error, a broken template or a shop setup for your downloads, the team at 24×7 WP Support works on WordPress themes and WooCommerce stores every day. Reach out if you would like a second pair of eyes on your build.
Related posts:

What Is the wp-config.php File in WordPress? Complete 2026 Guide

How Much Does Elementor Pro Cost? Pricing Breakdown 2026

WordPress Theme Files Explained: index.php, style.css and More

What Is a WordPress Child Theme and When Should You Use One in 2026?

How to Allow Upload Images in WordPress by Contributors?

Brian is a WordPress support specialist and content contributor at 24×7 WP Support. He writes practical, easy-to-follow guides on WordPress troubleshooting, WooCommerce issues, plugin and theme errors, website security, migrations, performance optimization, and integrations. With a focus on solving real website problems, Brian helps business owners, bloggers, and online store managers keep their WordPress sites running smoothly.


