Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Vad händer när du byter theme i WordPress?

Att byta WordPress-tema kan vara spännande, men det är viktigt att veta vad man kan förvänta sig. Med så många bra teman tillgängliga kan det vara frestande att byta tema. Det finns dock flera saker du bör tänka på innan du gör bytet.

I den här artikeln förklarar vi vad som händer när du byter WordPress-tema. Den här guiden hjälper dig att förstå förändringarna och förbereda dig för en smidig övergång.

Du kommer att lära dig om potentiella effekter på webbplatsens layout, widgets och anpassade inställningar. Genom att vara medveten om dessa förändringar kan du spara tid och säkerställa ett smidigt temabyte.

What happens when you switch your WordPress theme?

Vad händer om du byter theme i WordPress?

När du funderar på att byta tema på din WordPress site kan det vara svårt att veta vilka funktioner och funktioner ditt theme är ansvarigt för.

Det beror på att vissa WordPress-teman är enkla och minimalistiska och inte innehåller så många funktioner utöver en grundläggande design. Andra WordPress-teman är mångsidiga och har många olika mallar, anpassningsalternativ och funktioner som hjälper dig att anpassa din webbplats.

Beroende på funktionerna i ditt tema kanske du är rädd för att en ändring skulle leda till att du förlorar innehåll eller till och med raderar allt på din webbplats.

Lyckligtvis är det inte fallet. Du kommer inte att förlora all din sites content om du byter themes.

Ändå kan du förlora mer än du tror. Det är därför det är viktigt att förstå vad som händer när du byter theme och hur du byter WordPress themes utan att förlora content.

Med det sagt, låt oss gå igenom vad som kommer att hända när du byter ditt WordPress theme.

Temamenyer kommer att ändras med det nya temat för WordPress

WordPress har ett built-in system för navigation menyer. Varje WordPress theme har olika sätt att displaya och använda dessa menyer.

WordPress navigation menu example

Det är därför det kommer att finnas new menu locations när du byter WordPress theme.

Om du tidigare har tilldelat en menu till en viss theme location måste den tilldelas på nytt efter att your theme har ändrats.

Om du använder ett block editor-tema med fullt support för Site Editor, kan du edit menyer genom att besöka sidan Appearance ” Editor.

Launch site editor in WordPress

Detta öppnar gränssnittet för Site Editor.

I den vänstra panelen klickar du på tabben Navigation för att editera eller add to menyer.

Add or edit navigation menus

Peka och klicka för att editera ett menu item eller klicka på knappen Add (+) för att lägga till ett item.

När du är slutförd, glöm inte att clicka på knappen Save för att store dina ändringar.

Om du å andra sidan använder ett klassiskt tema (teman som inte stöder hela webbplatsredigeraren) kan du redigera menyer från sidan Utseende ” Menyer.

Välj bara din menu från rullgardinsmenyn högst upp för att hämta den.

Select WordPress navigation menu

Därefter kontrollerar du boxen för den location där du vill att menyn ska visas.

Du kan välja flera locations för en och samma menu.

Select navigation menu location

Mer detaljer finns i vår guide för nybörjare om hur du lägger till en navigation menu i WordPress.

Settings för WordPress widgets kommer att vara annorlunda

Medwidgetar kan du add to olika element till dina sidebar, footers och andra widget-redo areas i WordPress temat.

När du byter WordPress themes kommer dessa widget areas att ersättas och dina aktiva widgetar kommer att deactivate.

You can add these back to your site by going to Appearance ” Wid gets and going to the ’Inactive Widgets’ section.

Inactive widgets section

Mer detaljer finns i vår guide om hur du lägger till och använder widgetar i WordPress.

Om det theme du använder har egna widgetar kommer dessa inte att vara tillgängliga när du byter theme.

Settings för WordPress Theme kommer att försvinna

Alla WordPress teman har olika alternativ för customomize. Vissa teman förlitar sig helt enkelt på WordPress Theme Customize, medan andra styrs med en panel för temaalternativ.

En panel för temaalternativ kan kontrollera många aspekter av din site gillar:

  • Logotyp för website
  • Favicon image
  • Header och footers
  • Bakgrundsbild
  • Val av font
  • Och mer

Här är ett exempel på panelen för alternativ för temat Astra.

Astra theme options panel example

Den kan också innehålla alla koder för WordPress-analys, Advertising och andra tracking-koder som du har addat direkt till panelen Options.

Alla dessa inställningar som görs via ditt temas options panel kommer att försvinna.

Om du gjorde en lista över ändringar i WordPress-temat innan du bytte theme kan du försöka göra samma settings med your new theme. Ditt nya theme kan dock ha en annan uppsättning funktioner.

I de flesta fall bör det inte påverka din websites hastighet, prestanda eller ranking i search engines om du ändrar designinställningarna.

Men om ditt tema innehåller inställningar för analys eller sökmotorsoptimering i panelen för temats alternativ, måste du använda ett tillägg för att installera Google Analytics och optimera din WordPress SEO.

För analys rekommenderar vi att du använder MonsterInsights, det bästa analytiska tillägget för WordPress. Genom att använda ett plugin istället för dina theme settings kommer du inte att förlora några data när du byter themes.

För sökmotoroptimering rekommenderar vi att du använder AIOSEO eftersom det är det bästa SEO-pluginet för WordPress på marknaden och används av över 3 miljoner webbplatser.

AIOSEO

Det låter dig enkelt optimera din website för search engines utan att lära dig några komplexa tekniska färdigheter.

För mer detaljer, se vår guide om hur du ställer in All in One SEO för WordPress korrekt.

Code snippets i functions.php fungerar inte

Många website-ägare customize funktionaliteten i sina themes genom att lägga till kod i WordPress.

Om du har addat kod direkt till din functions.php-fil eller andra temafiler kommer den här koden inte att användas när du byter theme.

Se till att du noterar alla code snippets som du har addat till dessa temafiler, så att du kan lägga till dem i your new theme.

Ett bättre sätt att add snippets till din site är att använda ett code snippets plugin som gillar WPCode.

WPCode Code Snippets Plugin

Se vår guide om hur du klistrar in snippor från webben i WordPress för steg-för-steg-instruktioner.

Temaspecifika post types och taxonomier kommer att försvinna

Förutom att ändra designen på din website, kommer vissa WordPress themes också med sina egna custom post types och taxonomies.

Detta görs vanligtvis för att displayed content som gillar portföljer, böcker, testimonials, och mer.

Custom post types example

Om ditt theme använder custom post types och taxonomies, kommer dessa att bli otillgängliga när du byter themes.

De kommer fortfarande att vara lagrade i WordPress database, men du måste göra ytterligare customize för att visa dem med your new theme.

Det är därför vi rekommenderar att du använder ett WordPress plugin för att add to dessa funktioner istället för ett theme. På så sätt kan du fortsätta att använda dem enkelt när du byter WordPress themes.

För att hitta ett plugin för den funktion du behöver kan du se vårt expertval av de bästa WordPress-tilläggen, eller helt enkelt söka på Google och add to ”WPBeginner” till din search för att hitta våra beprövade och testade rekommendationer.

Temaspecifika sliders i WordPress kommer att försvinna

Många WordPress themes har built-in slider settings för att lägga till en full-screen home page slider. När du byter theme kommer dessa sliders att försvinna.

Built-in WordPress slider example

Om du vill lägga till sliders var som helst på din website rekommenderar vi att du använder ett WordPress slider plugin. För mer detaljer, ta en titt på vår jämförelse av de bästa WordPress tillägg för sliders.

WordPress Temaspecifika shortcodes kommer att försvinna

Shortcodes ger dig ett sätt att add new funktionalitet till dina posts, pages och widgetar areas.

Många populära WordPress teman kommer med sina egna shortcodes för att add to funktionalitet som gillar:

När du byter WordPress themes kommer dessa shortcodes inte längre att fungera. Som ett resultat kommer shortcoden helt enkelt att visas som text i dina content areas.

Om du vill framtidssäkra shortcodes för teman kan du add to koden med ett site-specifikt plugin istället. Detta låter dig lägga till customize med ett plugin som inte kommer att ändras, även när du byter themes.

För mer detaljer, se vår guide om hur du skapar ett site-specifikt WordPress plugin.

Vad förblir detsamma när du byter WordPress Themes?

Vissa delar av din WordPress blogg kommer att förbli oförändrade när du byter WordPress themes. Till exempel kommer dina WordPress posts och pages inte att påverkas av bytet av theme.

WordPress posts and pages stay the same

Men beroende på hur ditt gamla theme displayed posts, images, attachments, and pages, kan de se lite annorlunda ut.

Ditt mediabibliotek kommer också att förbli detsamma. Ditt WordPress theme kan dock ha olika bildstorlekar för featured images och thumbnails.

Om så är fallet kan du behöva återskapa thumbnails för att visa rätt storlek på image.

Alla dina allmänna WordPress-inställningar, gillar permalänkar, displayinställningar och mer, kommer att förbli desamma.

Det är samma sak med andra tillägg till WordPress som du har installerat, även om de kan fungera annorlunda med ditt new theme.

Hur förbereder man sig för att byta WordPress Themes?

Innan du byter WordPress themes finns det några saker du bör göra för att se till att det blir en smidig och error-fri upplevelse.

Först är det mycket viktigt att du skapar en komplett backup av din website med hjälp av ett WordPress backup plugin. Detta sparar en kopia av dina posts, pages, plugins, media och databaser.

Vi rekommenderar Duplicator, som är ett av de bästa tilläggen för backup av WordPress på marknaden.

Behöver du hjälp? Se vår guide om hur du säkerhetskopierar din site i WordPress med Duplicator.

När din site är säkerhetskopierad bör du ägna tid åt att reviewa ditt nuvarande theme.

Du kan notera alla anpassningar du har gjort, gillar custom CSS, widgets och mer som kan läggas till i ditt nya tema.

Review WordPress theme customizations

För mer detaljer, se vår checklista över saker du måste göra innan du byter WordPress themes.

Innan du aktiverar ditt nya Theme i WordPress kan du använda den built-in funktionen Preview för att se hur det kommer att se ut. WordPress låter dig installera och previewa themes i realtid utan att aktivera dem on the front end

Gå bara till Appearance ” Themes och hovera sedan över temat och klicka på knappen ’Live Preview’ för att se hur det kommer att gilla.

WordPress theme preview

När du previewar ditt theme, obs/observera alla visuella förändringar som kommer att träda i kraft.

You can browse your website’s home page, posts, other pages, archives, and more with the menu on the left.

Preview and test new WordPress theme

Efter det kan du avgöra om du kan justera inställningarna för det nya temat och layouten för att matcha de funktioner på din gamla site som är värda att behålla.

För mer detaljer, kontrollera vår guide om hur man korrekt ändrar ett WordPress theme.

Vi hoppas att den här artikeln hjälpte dig att lära dig vad som kommer att förändras när du byter WordPress themes. Du kanske också vill läsa vår guide om hur du väljer den bästa programvaran för webbdesign och våra val av de bästa tjänsterna för företagstelefoni för småföretag.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Avslöjande: Vårt innehåll stöds av våra läsare. Det innebär att om du klickar på några av våra länkar, kan vi tjäna en provision. Se hur WPBeginner finansieras, varför det är viktigt, och hur du kan stödja oss. Här är vår editoriala process.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Den ultimata WordPress-verktygslådan

Få GRATIS tillgång till vår verktygslåda - en samling WordPress-relaterade produkter och resurser som varje professionell användare bör ha!

Reader Interactions

44 kommentarerLämna ett svar

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Jiří Vaněk says

    Great. Sometimes our customers ask us what happens when they change the theme and whether it will be easy to revert to the original without damaging the website and graphics. Even though I always told them yes, that there is no significant risk, I wasn’t sure if I was completely right. Thanks for this article, which I can now refer to. Excellent job.

  3. Moinuddin Waheed says

    The main concern when I switch fro one theme to other as I have done has been the content specially the blog posts and pages content.
    It is good to realise that whatever be the theme they will have minimal to no impact on content. May be visual appearance may change and that is fine. in fact that is the reason why anyone would want to change to other themes.
    Thank you wpbeginner for making clear all possible consideration for changing a theme.

  4. Nadiia says

    Hello!
    I already changed a theme, I did that before and I know that need to work on settings, but I was thinking to pick an actual site template, will It impact somehow on my posts and media? I mean will I lose it? I did not import the website but do I need to press on ”delete a previously imported site?

    • WPBeginner Support says

      That would depend on your theme, some have templates that would overwrite and remove your old content if you reach out to your theme’s support they can clarify.

      Administratör

    • WPBeginner Support says

      Unless the theme has a set of plugins to specifically accompany the theme, most if not all plugins will be unaffected by the change.

      Administratör

  5. Sam Doying says

    Thank you for this content – it was very helpful. My question is this: I created my website about 2 years ago using the OceanWP theme. Now I’d like to do a complete from-scratch overhaul using the Hello Elementor theme. While I build my new site, I’d like my old site to just sit there, as is, and be available should someone want to visit. I don’t want it to adopt the new theme and be all funky because building the new site will take me a loooooooong time. Any way to do this? Thanks, Sam

  6. shanzah says

    hey i just wanted to ask that can I switch back to my custom made theme once I move to another theme? what if I want to come back to my previous theme? will it be saved in my database?

    • WPBeginner Support says

      When you change themes you should have the option to swap back later should you want.

      Administratör

  7. Glen says

    Thank you for these great explanations. But my question is a bit ease: what happened if I just switch to the Child theme? will this break anything in my settings?

    • WPBeginner Support says

      While it should not break anything, depending on the child theme you would likely need to set your customizations.

      Administratör

  8. Michal says

    Thanks, though I miss information about more aspects:
    – is changing theme destructive operation? Does it wipe some data from database, or can I switch safely back to original theme without data loss?
    – can I deactivate/delete old theme, then install/activate it back, and my website will look same as before, or not?
    – where actually theme-specific data are stored? per-theme database table, or files?

    • WPBeginner Support says

      Changing the theme would only remove data if your theme added custom post types which most themes shouldn’t. Deleting an old theme normally removes the information as that is a process normally included in the removal of a plugin or a theme. Where the data for the theme is stored depends on the specific theme.

      Administratör

  9. Claudia says

    Hi, I just changed themes from Envo to Astra. The transition has been smooth so far but I got on the main menu the items I had on the Envo theme plus the items on the Astra menu so I have two home tabs one says original and the other has the URL of my website. Out of these two which one should I keep on the menu? or doesn’t matter?

  10. Taran jeet says

    First of all Thanks to Your Team. Because of Your Inspiration, I Made a Website. I Am using Hestia. but after a few days, I just randomly check the theme editor. There are 13 theme errors. I want to fix them. I saw ur comment above. But my question is what if I completely remove the theme and reinstall it will I lose all my settings of that theme? Or is there any safe way to fix those errors? Anyone Can help me?

    • WPBeginner Support says

      If you manually delete the theme in your wp-admin area it would remove the settings you had set for that theme

      Administratör

  11. Michaela says

    And what if I just need to reinstall the same theme ? Would all settings and content stay ?
    Thank you ☺

  12. Nikita Smith says

    When doing this i seem to loose my ”portfolio” does anyone have any tips on how to ensure this doesnt happen?

  13. Paul says

    I recently installed a new theme for my portfolio but none of the content is showing up on live preview but is showing
    up in the backend editor Deleting project content and entering in new data also does not make a difference.

    • WPBeginner Support says

      Hi Paul,

      It seems like you are using a page builder plugin. Please contact your theme developer for support and they will be able to help you out or contact the page builder plugin’s support for help.

      Administratör

  14. GABRIELA MORENO says

    My question is, what happens to my old theme when I install the new one?

    Can I adjust the new theme without it being live?

    • WPBeginner Support says

      Hi Gabriela,

      Your old theme will be inactive but it will remain installed on your website unless you delete it. You can click on the preview button to see a live preview of the new theme on your website.

      Administratör

    • Gabriel Marmitt says

      Hello guys.

      I use the Twenty Ten theme since I started my site in 2013, I already have 5 years of website! But now I see that it’s important to have a responsive, fast, and friendly topic with SEO. I tried to do a test with the Twenty Sixteen theme, it worked well apparently, but when I looked at the analytics report, I realized that I did not have a visit any more, I tried to access my page through the phone and I saw in the analytics real-time visualization tool that my visit came, so I do not know what might have caused it and what should I do? Grateful for the attention.

  15. mohamedali shurbaji says

    If i change theme, and things disappear in the new one, how i can clean up the mess and start again fresh since I am deep progress through the old one. Thank you.

  16. Rob Manser says

    How does changing themes impact the SEO rankings for single page posts, provided I am using permalinks?

    • WPBeginner Support says

      Hi Rob,

      It actually depends on your WordPress theme. If it follows the WordPress coding best practices than there will be no impact on SEO. If it is slower or faster than your previous theme, uses some poor design practices, have bad user experience, then these kind of things may also have a slight impact on your SEO.

      Administratör

  17. Raddy says

    I would like to ask if I switch back to the theme againafter activating a new one is it going to keep its settings and customization or I should start from the begging ? Thanks

  18. Katie Keith says

    Useful article thanks. A lot of our WordPress clients think that changing theme is as simple as clicking a button and don’t realise that it can actually be days of work due to the theme-specific shortcodes, layouts, widgets etc. This is a good overview of the implications of changing theme.

  19. Connor Rickett says

    And some fine day, the ”preview” button will actually output a result that matches what you’ll see when the theme has actually been switched.

  20. Mione C says

    Thank you so much for this great, detailed article. I will feel much more confident doing my upcoming theme change now! I’d been putting it off for too long. You guys rock!

Lämna ett svar

Tack för att du väljer att lämna en kommentar. Tänk på att alla kommentarer modereras enligt våra policy för kommentarer, och din e-postadress kommer INTE att publiceras. Vänligen använd INTE nyckelord i namnfältet. Låt oss ha en personlig och meningsfull konversation.