Your WordPress theme controls the entire visual layer of your site – layout, typography, colors, header, footer, and how content is structured on every page. Changing a theme, installing a new one, or customizing what you already have are among the most common tasks in WordPress. Here is how to do all three without breaking your site.
Installing a theme#
There are two ways to install a WordPress theme: from the official repository through the dashboard, or by uploading a zip file.
From the WordPress theme repository
- Go to Appearance > Themes in your WordPress admin.
- Click Add New Theme at the top.
- Browse or search for a theme by name, feature, or layout type.
- Hover over the theme and click Install.
- Once installed, click Activate to make it your active theme.
The WordPress theme repository only lists free themes that have passed a review process. This does not guarantee quality or long-term maintenance, but it does mean the theme met basic coding standards at the time of submission.
Uploading a zip file
Premium themes from developers like Astra Pro, GeneratePress, Divi, or Flavor are distributed as zip files. So are themes purchased from marketplaces like ThemeForest.
- Go to Appearance > Themes.
- Click Add New Theme, then Upload Theme.
- Choose the zip file from your computer and click Install Now.
- Once the upload finishes, click Activate.
If the upload fails with an error about the file being too large, your server’s upload limit is lower than the theme file size. This is the same 413 Request Entity Too Large error that occurs with any oversized upload. You can also install themes via SFTP by extracting the zip file into
wp-content/themes/
and then activating through the dashboard.
The
wp-content/themes/
directory is where all installed themes live on disk, whether active or not. For a detailed look at what this directory contains and why inactive themes matter for security, see what is wp-content and what goes in it.
Switching themes#
Switching themes means activating a different installed theme. Go to Appearance > Themes, hover over the theme you want, and click Activate. The change is instant and affects the entire site.
What survives a theme switch
Your content is safe. Posts, pages, media, menus (the items themselves), widgets (the content), and all plugin functionality carry over. The database stores your content independently from the theme – that separation is fundamental to how WordPress works as a CMS.
What does not survive
Theme-specific features disappear. This includes:
- Custom template layouts – if the old theme had custom page templates (full-width, sidebar-left, landing page), pages assigned to those templates revert to the new theme’s default layout.
- Theme-dependent shortcodes – some themes register their own shortcodes. After switching, those shortcodes render as plain text.
- Widget areas – if the new theme has different widget areas (sidebars, footers), widgets may be moved to the Inactive Widgets section.
- Customizer settings – colors, fonts, header images, and other settings configured through the Customizer are theme-specific. They are saved in the database (so switching back restores them), but they do not transfer to a different theme.
- Menu locations – menu items are preserved, but menu locations (Primary, Footer, etc.) are defined by the theme. After switching, reassign menus under Appearance > Menus or in the Customizer.
Before you switch
- Check the new theme on a staging site first. Activate it on a copy of your site to see what breaks before doing it in production. If your host offers staging environments, use them.
- Note your current Customizer settings. Screenshot them or write them down. If you ever switch back, the settings will still be in the database, but if you are moving forward with a new theme permanently, you will need to reconfigure these.
- Check plugin compatibility. Page builder plugins (Elementor, Beaver Builder, Divi Builder) store layouts in post meta, not in the theme. Switching themes usually preserves builder layouts, but the visual result can look different because the theme’s CSS no longer applies.
Updating a theme#
Theme updates work like plugin updates. Go to Appearance > Themes, and if an update is available, you will see a notification. Click Update to install the new version.
For themes installed from the WordPress repository, updates appear automatically. For premium themes installed via zip file, updates are handled differently depending on the developer:
- Some premium themes include a license key that enables automatic update checks through the dashboard.
- Others require you to download the new zip from the developer’s site and upload it manually (the same way you installed it).
- A few use a companion plugin to manage updates.
Updates overwrite the theme’s files entirely. Any changes you made directly to the theme’s PHP, CSS, or template files will be lost. This is why child themes exist.
Child themes vs parent themes#
A child theme inherits everything from a parent theme and lets you override specific parts without modifying the parent. When WordPress renders a page, it checks the child theme first and falls back to the parent for anything the child does not override. If you want to go beyond child themes and build a custom theme from scratch, that guide covers the template hierarchy,
functions.php
, block themes, and custom post types.
Why child themes matter
If you customize a theme by editing its files directly, the next theme update will overwrite every change you made. A child theme avoids this because the parent updates independently while your customizations remain in the child theme’s directory.
Creating a child theme
A child theme needs only two files at minimum:
style.css with a required header:
/*
Theme Name: Your Theme Child
Template: your-theme
*/
The
Template
line must match the parent theme’s directory name exactly. Not the display name – the folder name in
wp-content/themes/
.
functions.php to load the parent theme’s styles:
<?php
add_action('wp_enqueue_scripts', function() {
wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css');
});
Place both files in a new directory inside
wp-content/themes/
(for example,
your-theme-child/
). Then activate the child theme through Appearance > Themes. It will appear as a separate theme.
What you can override in a child theme
- Template files – copy any template file from the parent (like
header.php,single.php,page.php) into the child theme directory and modify it. WordPress will use the child’s version. - Styles – add custom CSS in the child theme’s
style.css. It loads after the parent styles, so your rules take precedence. - Functions – add new functions or override parent functions (if the parent uses
function_exists()checks) in the child’sfunctions.php. - Template parts – same as template files. Copy the specific part you want to change.
You do not need to copy every file from the parent. Only copy and modify the files you want to change. The fewer files in your child theme, the easier it is to maintain.
Customizing a theme without editing files#
WordPress provides several ways to customize your theme’s appearance without touching any code.
The Customizer (classic themes)
Go to Appearance > Customize. The Customizer lets you change settings like:
- Site identity (title, tagline, logo) – this is the same site title and tagline that appears in browser tabs and search results
- Colors and typography (depends on the theme)
- Header and background images
- Menu locations
- Widget placement
- Homepage settings (latest posts vs static page)
Changes preview in real-time before you publish them. What is available in the Customizer depends entirely on the theme – premium themes typically expose more options.
The Full Site Editor (block themes)
Block themes (like Twenty Twenty-Four and Twenty Twenty-Five) use the Full Site Editor instead of the Customizer. Go to Appearance > Editor to access it.
The Full Site Editor lets you modify:
- Templates – the layout structure of specific page types (single post, archive, 404, search results). Each template is built from blocks that you can rearrange, add, or remove.
- Template parts – reusable sections like headers and footers that are shared across templates.
- Global styles – fonts, colors, spacing, and layout defaults that apply across the entire site. This replaces the theme’s
style.cssfor design tokens. - Patterns – pre-designed block arrangements you can insert into pages and templates.
Block themes represent a different model from classic themes. Instead of PHP template files that mix logic and markup, block themes use HTML-based templates and a
theme.json
file that defines design options declaratively. Customization happens through the editor interface, and you rarely need to touch code.
Custom CSS
For targeted visual changes that the Customizer or Site Editor do not cover, add custom CSS:
- Classic themes: Appearance > Customize > Additional CSS
- Block themes: Appearance > Editor > Styles > Additional CSS (click the three-dot menu in the Styles panel)
Custom CSS persists across theme updates because it is stored in the database, not in the theme files. It is a safe way to make small visual tweaks without a child theme.
The Twenty Twenty-Four "no top bar" problem#
Twenty Twenty-Four is a block theme, and it handles navigation differently from classic themes. If your pages are missing the top navigation bar or header, the issue is almost always the template structure.
- Go to Appearance > Editor.
- Click Templates in the left sidebar.
- Select the template for the affected page type (usually Page or Single Posts).
- Check if the template includes a Header template part at the top. If it is missing, add it.
- If the header exists but looks wrong, click Template Parts in the sidebar, then edit the Header part directly.
The same applies to the footer. Block themes assemble pages from template parts, so a missing header or footer means the template is not including that part. This is not a bug – it is how block themes are designed to work.
Deactivating and deleting a theme safely#
Deactivating
You cannot deactivate a theme the way you deactivate a plugin. WordPress always needs an active theme. To “deactivate” a theme, activate a different one. The old theme remains installed but inactive.
Deleting
Inactive themes take up disk space, and more importantly, they are a security risk. An inactive theme’s PHP files are still on disk and some can be accessed via URL. If that theme has a known vulnerability, an attacker can exploit it even though it is not active. This is the same principle that makes outdated plugins dangerous – the code exists on the server whether it is running or not.
To delete an inactive theme:
- Go to Appearance > Themes.
- Click on the inactive theme to open its details.
- Click Delete in the bottom-right corner.
Keep your active theme, its parent theme (if you are using a child theme), and one default theme as a fallback. Delete everything else.
The fallback theme matters because if your active theme crashes – say, after a PHP update makes it incompatible with a newer version – WordPress automatically falls back to the latest default theme installed. If no default theme exists, you get a white screen with no automatic recovery path.
Switching a theme via WP-CLI#
If you have SSH access, WP-CLI is the fastest way to manage themes:
# List installed themes
wp theme list
# Install a theme from the repository
wp theme install flavor --activate
# Activate an already-installed theme
wp theme activate flavor
# Update a theme
wp theme update flavor
# Update all themes
wp theme update --all
# Delete an inactive theme
wp theme delete flavor
WP-CLI is especially useful when the admin dashboard is inaccessible. If a theme update caused a white screen of death, you can switch to a default theme over SSH without needing the browser.
Choosing a theme#
This article focuses on the how, not the which – but a few practical guidelines:
- Lightweight beats feature-rich. A theme that loads 400KB of CSS and JavaScript on every page slows your site regardless of hosting. Starter themes like Flavor, Astra, GeneratePress, and Kadence load a fraction of that. The performance difference is measurable in Core Web Vitals scores.
- Check the last update date. A theme that has not been updated in two years may not support the current WordPress version, the current PHP version, or the Full Site Editor. An abandoned theme is a liability.
- Block theme vs classic theme. Block themes are the direction WordPress is heading. They use the Full Site Editor and
theme.jsonfor customization. Classic themes use the Customizer and PHP templates. Both work, but new sites benefit from starting with a block theme since the tooling and community investment is moving that way. - Check the reviews and active installations. A theme with 500,000 active installations and a 4.8 rating is a safer bet than one with 200 installations and no reviews. Popular themes get more bug reports, more patches, and more community resources.
If you are migrating an existing site to a new host and want to bring your theme along, see how to migrate WordPress to another hosting provider for the complete process including theme files.