GuidesChapter 1 · Themes

Themes

How to switch WordPress themes without breaking your site

A new theme leaves your posts alone but can scatter menus, widgets and CSS. Back up, list what the old theme does, preview with your content, then switch.

Two printed website homepages in different designs side by side on a pale table, the older one covered in pencil circles and arrows
Fig. 1The old design and the new one, side by side before the switch.

In short

Back up the site, write down everything the old theme does for you, and preview the new theme with your own content before you activate it. After the switch, put the menus and widgets back, hunt down leftover shortcodes and check every kind of page on a phone.

A new theme changes how every page of your site looks in one click, and the click is the easy part. Your posts, pages and pictures stay put, because WordPress keeps them in its database, not in the theme. What can go missing is everything the old theme did on top of your content: the menu in its header, the widgets in its sidebar, the logo, colors and fonts you set in its options, and any extras it added. Here is how to switch without losing any of it, to a classic theme or a block theme.

What a theme switch changes

Some parts of a site belong to the theme, some to you. Here is where each one ends up.

Part of your site What happens when you switch What to do
Posts, pages and media Stay as they are, shown in the new design Check your longest page and a post with pictures
Menus May lose their place until you assign them in the new theme Reassign them, or import them into a block theme
Widgets Move to Inactive Widgets if the new theme has no matching area Drag them into the new theme’s areas
Customizer settings and Additional CSS Stay with the old theme and come back if you switch back Copy your CSS into a text file first
Shortcodes and extras from the theme Show as bracketed text, or vanish from the dashboard Replace them, or move the feature to a plugin

Back up the whole site first

A backup is the undo button for everything else in this guide. Make one that covers both the files and the database, and keep a copy somewhere other than your hosting account. If your host takes backups, find out how to restore one before you rely on it. If you would rather hold your own, UpdraftPlus has a free version that sends scheduled backups to places like Google Drive or Dropbox, and its paid plans add extras such as a staging copy to test on.

Tip: if your host offers a staging site, a private copy of your site for testing, do the whole switch there first. You fix everything out of sight, then repeat only the steps that worked on the live site.

List what the old theme does for you

Open your site in one browser tab and the dashboard in another, and write down everything that comes from the theme rather than from your writing:

  • the menus, and where each one sits: header, footer, mobile;
  • the widgets in the sidebar and footer, with their settings;
  • your logo, colors, fonts and header image from Appearance > Customize;
  • any Additional CSS, copied in full into a text file;
  • shortcodes from the theme, the bits in square brackets that make a button or a slider;
  • extra content types the theme added, such as portfolio items or testimonials.

The last two catch people out. A shortcode the new theme does not know shows up on the page as plain text in brackets. Content types a theme adds disappear from the dashboard with it: the entries stay in the database, but nothing shows them until a theme or plugin registers that type again.

Pages built with a page builder that came with the theme depend on it too. Divi is the common case: pages laid out in its builder don’t move cleanly to another theme, which is why Theme Match’s Divi Copywriter entry calls Divi a choice for years, not months. Some builders are also sold on their own, which can keep those pages working under a new theme: Elegant Themes offers Divi’s builder as a plugin for use with other themes. Divi and its prices are on our Tools page. Ask your theme’s maker how your pages carry over before you leave.

Preview the new theme with your content

Install the new theme from Appearance > Themes, but do not activate it yet. (On WordPress.com, uploading a theme you bought elsewhere needs a paid plan; WordPress.com vs WordPress.org sets out what each plan allows.) Hover over the theme and choose Live Preview. A classic theme opens in the Customizer, a block theme in the Site Editor. Either way you see your own posts and pages in the new design, and nothing changes for visitors until you click Activate.

If you found the theme on a marketplace such as ThemeForest, keep its demo open next to your preview. The demo was built with the maker’s photos and words; the preview shows what happens with yours, and that gap is the real test of a theme, as it is when choosing a website template in the first place. Click through your home page, a long post, a category page and your contact page. If the preview comes up blank, stop: WordPress’s own guide to working with themes says not to activate a theme with a blank preview until you have found out why.

Switch, then put menus and widgets back

When the preview looks right, make the switch while the fewest people are on the site:

  1. Find the quietest hour of the week in your analytics.
  2. Make a fresh backup, even if you made one yesterday.
  3. In Appearance > Themes, click Activate on the new theme.
  4. Put the menus and widgets back, as below.
  5. Upload your logo again and set the colors and fonts from your list.
  6. Paste back only the CSS you still need. Old CSS was written for the old theme’s layout, so much of it will do nothing, or clash.

On a classic theme

Go to Appearance > Menus, open each menu, tick the display location it belongs in under Menu Settings, and click Save Menu. Then open Appearance > Widgets. If widgets seem to be missing, scroll down to Inactive Widgets: WordPress keeps them there, settings and all, when the new theme has fewer or different widget areas. Drag each one into the new sidebar or footer.

On a block theme

A block theme usually has no Menus screen and no widget areas; the header, footer and menu are all blocks. Open Appearance > Editor and select the Navigation block in the header. In the settings sidebar, open Options (the three dots beside the menu’s name) and choose Import classic menus to bring your old menu across. Then rebuild your old widgets as blocks in the header and footer template parts: a Search block, a list of latest posts, a paragraph with your opening hours.

A hand-drawn wireframe of a website header, sidebar and footer on graph paper, with colored sticky notes marking where the menu and the widgets go

Check the site the way visitors see it

Open the site in a private browser window, so you see it logged out, then on your phone. Look at every kind of page: the home page, a post, a page, a category, the search results and the 404 page.

Search your posts for each shortcode on your list and replace the ones that now show as text. Look closely at featured images: themes ask for their own picture sizes, and WordPress makes those sizes at upload, so older pictures can look soft or oddly cropped. A thumbnail regeneration plugin rebuilds them; check when it was last updated before you install it. Then send yourself a message through the contact form.

Keep the old theme installed for a week or two in case you want to switch back, then delete it, since every installed theme needs updates. More on choosing and changing themes is in the Themes section, and backups, updates and the plugins most sites need are in WordPress. If you have not picked the new theme yet, Theme Match turns five answers into three themes and what each costs every year.

Questions

Will I lose my posts and pages if I change themes?

No. Posts, pages and media live in the WordPress database, not in the theme, so they stay. What can go missing is what the old theme added on top: its menu locations, widget areas, Customizer settings, shortcodes and extra content types such as portfolio items.

Can I switch back if I don’t like the new theme?

Yes, as long as the old theme is still installed. Its Customizer settings and Additional CSS are saved with it and return when you reactivate it, though you may need to put menus and widgets back in place again. Keep the old theme installed until you are sure.

Should I switch on the live site or on a staging copy?

A staging copy is safer if your host offers one, because you can fix everything before a visitor sees it. On a small site with a fresh backup, a careful Live Preview and a quiet hour, switching on the live site is usually fine.

Will changing my WordPress theme affect my SEO?

Your web addresses stay the same, because permalinks are a WordPress setting, not part of the theme, and your posts and pages don’t change. What a theme can change is how each page is built: which text becomes the main heading, any structured data the theme adds, how page titles are written if you don’t use an SEO plugin, and how quickly pages load on a phone. After the switch, check your homepage and a post in Search Console’s URL Inspection tool.

Sources

  1. Work with themes, WordPress.org Documentation,
  2. Manage WordPress widgets, WordPress.org Documentation,
  3. Navigation block, WordPress.org Documentation,
Share