75 guides published Start a blog Fix my site How we test
THEMES

Switch a WordPress Theme Without Breaking the Site

We may earn a commission if you buy through our links. It does not change what we recommend or what you pay. How this works.

Switching themes looks like a one-click operation and is not. Content survives; a surprising amount of everything else does not, and the things that break tend to break quietly.

The short version

  • Content is safe. Configuration is not.
  • Shortcodes from the old theme stop rendering and appear as raw text.
  • Do it on staging, with a list of every page you need to check.
  • Keep the old theme installed until you are certain.

What carries over

SurvivesDoes not survive
Posts, pages and mediaTheme mods and Customizer settings
Menus (but not their locations)Widget placement
Categories and tagsTheme shortcodes
Plugin settingsTheme-specific custom fields
UsersPage templates unique to the old theme
Additional CSS (usually)Header and footer builder layouts

The preparation

1. List every page type

Home, a post, a category, an archive, search results, 404, and every custom template in use. This is your test list.

2. Screenshot the current site

Every page on the list, desktop and mobile. You will want the comparison.

3. Record the Customizer settings

Screenshots of every panel. There is no export that works across themes.

4. Note every theme shortcode in use

Search the posts table for the old theme’s shortcode prefix. Each one needs a replacement.

5. Copy the site to staging

Do the entire switch there first.

Finding theme shortcodes

wp db query "SELECT ID, post_title FROM wp_posts WHERE post_content LIKE '%[oldtheme_%' AND post_status = 'publish';"

Every result is a page that will display raw shortcode text after the switch. Decide on replacements before you activate anything.

The switch

  1. Activate the new theme on staging.
  2. Re-assign menus to the new theme’s locations.
  3. Rebuild the header and footer.
  4. Re-place widgets.
  5. Work through your page list and compare against the screenshots.
  6. Fix the shortcodes.
  7. Check mobile at 620px and tablet at 1000px.
  8. Run a crawl for broken images and missing styles.

Watch out

Do not delete the old theme once you switch on production. Keep it installed and inactive for at least a month. If something turns out to have depended on it, you want to be able to switch back in seconds.

After going live

  • Re-check Core Web Vitals. A new theme changes LCP and CLS, usually for the better but not always.
  • Watch Search Console coverage for a fortnight.
  • Re-verify structured data, which is frequently theme-provided.
  • Check that ad slots still render with reserved height.

Common questions

Will I lose my content?

No. Posts, pages and media live in the database and uploads folder, independent of the theme.

How long does a switch take?

For a simple blog, two hours including testing. For a site with a builder and custom templates, budget days.

Can I preview before switching?

The Customizer’s live preview shows the new theme without activating it. It does not reveal shortcode or template problems, so it is a partial test only.

S

Sumit

Writes everything on TechMozz.

More in Themes