How to Change Your WordPress Theme Without Breaking Your Site

Switching themes takes one click, but some things don't come with you: menu locations, widgets, custom CSS and template edits. How to change themes safely, in order, and put back what moves.

In this article
  1. 01The short answer
  2. 02What changes when you switch
  3. 031. Back up and note what's theme-specific
  4. 042. Preview the new theme
  5. 053. Activate, then put back what moved
  6. 06Change the theme without wp-admin
  7. 07Where WPOS fits
Key takeaways
  • Posts, pages and media stay in the database; a new theme changes how they look, not what they say.
  • Back up first, and copy your custom CSS: Additional CSS is saved per theme.
  • Live Preview shows the theme before visitors see it; block themes preview in the Site Editor.
  • WordPress maps menu locations where it can; widgets without a matching area go to Inactive Widgets.
  • Site Editor changes and Customizer settings stay with the old theme and return if you switch back.
  • After activating, check key pages on a phone and regenerate thumbnails if images look off.

The short answer

Go to Appearance > Themes, hover over the new theme, click Live Preview, then Activate. Your posts, pages and media stay exactly where they are. What can move is everything tied to the old theme, so work in this order:

  1. Back up the site, files and database.
  2. Note your menus and widgets, copy your custom CSS, and move any code you added to theme files into a plugin.
  3. Try the new theme with Live Preview, or on a staging copy.
  4. Activate it.
  5. Reassign menus, put widgets back, paste your CSS, and check your key pages.

What changes when you switch

Content lives in the database, so a new theme doesn’t touch it. These are the parts that depend on the theme:

  • Menus. On classic themes, menus sit in theme locations. WordPress maps them to the new theme’s locations where it can, but check Appearance > Menus > Manage Locations. Block themes use the Navigation block, whose menus are saved apart from the theme.
  • Widgets. If the new theme has no matching widget area, WordPress moves those widgets to Inactive Widgets instead of deleting them.
  • Custom CSS. Additional CSS is saved per theme, so the new theme starts without it. Copy it before you switch.
  • Site Editor changes. Templates, template parts and styles you customized in a block theme belong to that theme. They stay with it, and come back if you switch back.
  • Theme extras. Shortcodes, page templates, settings and custom content types that came with the old theme stop working. Pages set to a template the new theme lacks use its default template.
  • Images. The new theme may use different image sizes. Regenerate Thumbnails (1 million+ installs) rebuilds them for existing uploads.
  • Code in theme files. Anything pasted into header.php, footer.php or functions.php, such as a tracking tag, disappears with the theme.

1. Back up and note what's theme-specific

Take a full backup first, from your host or a backup plugin, so you can undo the switch in minutes. Then write down, or screenshot, three things:

  • Which menu sits in which location, under Appearance > Menus on a classic theme.
  • Which widgets sit in which widget area, under Appearance > Widgets.
  • Your custom CSS. Copy it into a text file.

If you added code to the current theme’s files, move it into a plugin such as WPCode or into a child theme of the new theme, so it survives the switch. Our guide to editing the footer covers where footer scripts belong.

2. Preview the new theme

Install the theme from Appearance > Themes > Add New Theme, choosing from the 8,878 themes in the WordPress directory or uploading a theme file. Then hover over it and click Live Preview. A classic theme opens in the Customizer; since WordPress 6.3, a block theme opens in the Site Editor. Visitors keep seeing your current theme until you click Activate.

Live Preview shows the design, not how the theme behaves with all your plugins and real content. For a business site, test on a staging copy first; many hosts create one in a click.

3. Activate, then put back what moved

  1. Click Activate.
  2. Reassign menus: Appearance > Menus > Manage Locations on a classic theme, or edit the Navigation block in the header on a block theme.
  3. Open Appearance > Widgets, find Inactive Widgets, and drag what you still need into the new theme’s areas.
  4. Paste your custom CSS, and remove the rules the new theme no longer needs.
  5. Check the home page, a post, a page, your contact form and, if you sell, the checkout, on a phone as well as a desktop.
  6. If images look cropped or blurry, run Regenerate Thumbnails.

Change the theme without wp-admin

With WP-CLI, one command installs and activates a theme, and another switches back to a default theme if the new one causes trouble:

wp theme install theme-slug --activate
wp theme activate twentytwentyfive

Without WP-CLI or dashboard access, rename the active theme’s folder in wp-content/themes over SFTP; WordPress falls back to a default theme if one is installed. Our guide to the critical error message covers that recovery in detail.

Where WPOS fits

A theme switch is one click followed by a long checklist. WPOS puts an agent inside wp-admin on the sites you already run, on any host, and it checks its own render with a browser screenshot before it reports done, so the checklist becomes one request:

“After this theme switch, list the menus that lost their location and the widgets that ended up in Inactive Widgets, then screenshot the home, blog and contact pages on desktop and phone.”

WPOS is our product, so weigh this section accordingly; you can try it free for 30 days with 5,000 credits, a live site plus a staging sandbox, and no card.

Frequently Asked Questions

No. Posts, pages, media and users stay in the database. What changes is how they look, plus theme-specific parts such as widget placement, menu locations, custom CSS and shortcodes.

Use Live Preview on Appearance > Themes. For a full test with your plugins and content, use a staging copy of the site.

Widgets in areas the new theme doesn't have move to Inactive Widgets under Appearance > Widgets. Drag them into the new theme's widget areas.

Often not: WordPress maps menu locations from the old theme where it can. Check Appearance > Menus > Manage Locations on a classic theme; block themes use the Navigation block.

Yes, as long as you don't delete it. Reactivating it brings back its Customizer settings, custom CSS and Site Editor changes.

Your URLs and content stay the same, but headings, speed and structured data can change with the theme. Check key pages, test speed, and watch Search Console for a few weeks.

One click to switch. One request to check it.

WPOS puts an AI agent inside wp-admin on the sites you already run, on any host, and it checks its own work. Free for 30 days: 5,000 credits, a live site plus a sandbox, no card.

Start free