The short version
Themes live in wp-content/themes/ and are responsible for templates, CSS, and the visual structure of pages. Plugins live in wp-content/plugins/ and are responsible for behavior: forms, SEO metadata, caching, ecommerce logic, security scanning, and anything else that adds a capability rather than a look.
Because both are PHP code that hooks into WordPress core through the same actions and filters system, the line can blur in practice. A theme's functions.php can technically register custom post types or shortcodes, which is really plugin territory, and this is one of the most common sources of confusion for new site owners.
Why the separation matters
Keeping design and functionality separate means you can swap your theme without losing your contact forms, SEO settings, or ecommerce catalog, because those live in plugins and stay in the database independent of which theme is active. If a theme bundles core functionality instead of a plugin doing it, you get locked in: switching themes silently breaks features.
This is why WordPress.org theme review guidelines explicitly discourage themes from including functionality that belongs in a plugin, such as custom post types, widgets unrelated to display, or SEO tools. Reputable theme developers follow this separation; it is a good signal of theme quality when shopping for one.
What each one can and cannot do
A theme can change your typography, add block patterns, define your header and footer markup, and register menu locations and widget areas via functions.php. It cannot, on its own, safely add a payment gateway, a caching layer, or a security firewall without effectively acting like a plugin in disguise.
A plugin can add a shopping cart, a form builder, an SEO analysis tool, or backup automation, and it does this independent of which theme is active. It generally cannot restructure your page layout wholesale, though page-builder plugins like Elementor or the WordPress block editor blur that boundary by injecting their own markup into theme templates.
- Theme: style.css, template files, theme.json, screenshot.png
- Plugin: a main PHP file with a plugin header, its own settings pages, its own hooks
- Both: use add_action() and add_filter() to hook into WordPress core
Real examples side by side
Astra and GeneratePress are themes: they define layout and typography and rely on plugins for anything beyond display. WooCommerce and Contact Form 7 are plugins: they add ecommerce and form functionality that works with almost any properly coded theme.
Some products, like page builders, occupy a gray zone by shipping both a theme and companion plugin, or a plugin so central to the site's structure that it feels theme-like. That combination is fine as long as removing the plugin does not permanently corrupt your content or leave orphaned shortcodes visible to visitors.
What happens if you mix them up
If you build custom functionality directly into a theme's functions.php and later change themes, that functionality disappears immediately, taking any data structures tied to it along conceptually if not literally. This is the single most common regret site owners report after a theme switch: a shortcode-driven feature or custom post type that only existed because the old theme defined it.
The fix is a small "must-use" or site-specific plugin that holds anything you want to survive a theme change: custom post types, shortcodes, tracking scripts, and hook-based tweaks. Reserve the theme itself strictly for visual template code.
How this affects converting a design into WordPress
When you turn an existing website design into a WordPress theme, that package should really only contain style.css, header.php, footer.php, index.php and related template files plus assets, not functional plugins. Themify follows this pattern: it generates a clean classic theme structure from a captured page, and functional needs like forms or ecommerce are still added afterward through standard WordPress plugins, exactly as they would be with any hand-coded theme.
Frequently asked questions
- Can a plugin change how my site looks?
- Yes, some plugins, especially page builders, inject their own markup and CSS into pages, which visually changes layout even though the active theme is unrelated to that specific design.
- Can I have a theme with no plugins at all?
- Yes, a barebones WordPress site with just a theme will render pages fine, but you will be missing conveniences like SEO tools, forms, caching, and security scanning that plugins normally provide.
- Is a page builder a theme or a plugin?
- Almost always a plugin. Elementor and similar tools are plugins that work alongside any properly coded theme, injecting their own block-level markup into the theme's page templates.
- Why do some themes look broken after I deactivate a plugin?
- That usually means the theme was relying on CSS or shortcodes the plugin provided, which is a sign the theme was not built with a clean separation between design and functionality.
- Do child themes count as plugins?
- No, a child theme is still a theme; it inherits from a parent theme and only overrides templates or styles, it does not add independent functionality the way a plugin does.
