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

Så här flyttar du enkelt WordPress till en new domän (utan att förlora sökmotorsoptimering)

Att flytta din WordPress-webbplats till en ny domän är ett stort steg som kräver noggrann planering. Att ändra ditt domännamn kan påverka din SEO-rankning, så det är viktigt att hantera processen med omsorg.

Även om tillfälliga SEO-fluktuationer är oundvikliga under en domänmigrering kan du minska påverkan. Med rätt tillvägagångssätt kan du snabbt återfå din söktrafik och ranking.

I den här guiden går vi igenom det korrekta sättet att flytta WordPress till en ny domän utan att förlora SEO.

Migrating a WordPress website to a new domain name without loosing SEO

Att flytta din WordPress site till ett nytt domain name kan vara skrämmande, men det behöver det inte vara. Vi finns här för att hjälpa you genom varje steg i processen.

Du kan klicka på någon av länkarna under för att gå till ett visst steg i flyttningen av din WordPress site till ett nytt domain name:

Video Tutorial

Subscribe to WPBeginner

Om du föredrar skriftliga instruktioner är det bara att fortsätta läsa.

Vad du bör veta innan du byter domäner

Innan du börjar är det några saker du bör känna till.

Processen att överföra till en ny domän kommer tillfälligt att påverka din ranking hos sökmotorer eftersom Google och andra search engines måste anpassa sig till förändringarna.

Det kommer också att tillfälligt påverka din söktrafik. Tänk på att detta är normalt, och att det händer alla webbplatser som byter till en ny domän.

Du kan dock dramatiskt minska sökmotorsoptimeringen genom att följa den här guiden. Vi kommer att visa dig hur du flyttar din WordPress site till ett nytt domain name, ställer in korrekta 301 redirects och meddelar search engines.

Vänligen notera att denna guide ej är till för att flytta en WordPress site till en new server. Detta är endast för att byta ett domain name. Även om processen är likartad finns det några extra steg. Dessa extra steg hjälper dig att skydda din sökmotorsoptimering och trafik.

Slutligen, om din gamla website finns på WordPress.com, måste du följa instruktionerna i vår guide om hur du flyttar från WordPress.com till WordPress.org istället.

Förberedande steg: Vad du behöver för att komma igång

I den här guiden antar vi att du har din WordPress-webbplats konfigurerad på oldsite.com och att du försöker migrera den till newsite.com.

Vi förutsätter också att du redan har ett konto på ett WordPress webbhotell och att du är bekant med kontrollpanelen på ditt webbhotell.

Du måste också veta hur man använder en FTP-klient som FileZilla eller hur man redigerar filer med appen File Manager som finns tillgänglig i adminpanelen på ditt webbhotell.

Om du inte har en hosting provider eller vill byta till en new, rekommenderar vi att du använder Bluehost (bra för små webbplatser + kommer med en gratis domän) och antingen SiteGround eller WP Engine (bra för större webbplatser eller online stores).

När du har dessa saker på plats är du redo att starta processen!

Step 1: Skapa ett Duplicator-paket av din WordPress-webbplats

Det första du behöver göra är att skapa en fullständig backup av din WordPress site.

You’ll then use this backup to create a duplicate of your website so that you can set up the redirects properly from your old domain to the new one.

Det finns många WordPress-backup-plugins tillgängliga, men vi kommer att använda Duplicator för denna handledning.

Duplicator är det bästa plugin-programmet för säkerhetskopiering och migrering av WordPress. Vi har använt det för att migrera otaliga webbplatser för våra egna företag såväl som för kunder. Vi har funnit att det fungerar pålitligt, även för mycket stora webbplatser.

Obs: Det finns också en gratisversion av Duplicator som du kan använda för den här migreringen. Vi rekommenderar dock att du uppgraderar till en betald plan för att låsa upp fler funktioner som automatiska molnbackuper, 1-klicks webbplatsåterställning, enklare migreringar och mer.

Låt oss börja med att installera och aktivera pluginet Duplicator på ditt gamla domain name. För mer detaljer, se vår Step-by-Step guide om hur man installerar ett plugin för WordPress.

När pluginet har aktiverats kommer det att add to ett Duplicator menu item i din WordPress admin. Du måste klicka på Duplicator-menyn och sedan klicka på knappen ”Skapa ny” för att skapa ett nytt paket eller en kopia av din WordPress-webbplats.

Create a new Duplicator package

Duplicator kommer nu att initiera back wizard den kommer automatiskt att tilldela ett namn till detta paket.

Klicka på knappen ”Nästa” för att fortsätta.

Duplicator package name

Duplicator kommer nu att köra några tester för att se om allt är i order. Om tillägget hittar en issue kommer du att se en varning med instruktioner.

Om alla objekt är markerade med ”Bra” klickar du på knappen ”Bygg”.

Duplicator build package

Pluginet kommer nu att börja skapa ett dupliceringspaket av dina webbplatsfiler. Beroende på storleken på din webbplats kan den här processen ta några minuter.

När du är slutförd ser du ett alternativ för ”Download”. Click it will show you alternatives to download Both Files or download Installer and Archive (zip) separately.

Duplicator download both files

Välj ”Both Files” för att downloada dem till din dator.

Archive-filen är en komplett kopia av dina WordPress-filer. Den innehåller dina WordPress themes, permalänk settings, plugins, uppladdare och alla andra filer som skapas av WordPress plugins.

Skriptet för att installera är en PHP-fil som automatiserar och run migreringen av WordPress genom att packa upp archive-filen.

Step-by-Step 2: Skapa en Database för ditt nya Domain Name

Innan du flyttar din WordPress site till den nya domänen behöver du en ny SQL database för att packa upp WordPress på ditt nya domain name.

Om du redan har skapat en database kan du hoppa över detta steg.

För att skapa en database måste du besöka ditt webbhotells kontos cPanel dashboard, rulla ner till ”Databases” section och sedan click på ”MySQL Databases” icon.

Vi kommer att visa dig hur du hittar den på Bluehost, men de grundläggande instruktionerna är desamma och bör gälla för alla hosting providers.

Logga in på instrumentpanelen för ditt Bluehost-konto och klicka på knappen ”Settings” under din website.

Bluehost site settings

Under your site settings måste du växla till tabben ”Advanced”.

Rulla ner lite till cPanel section och click ”Hantera”.

Bluehost cPanel

Detta öppnar dashboard för cPanel.

Rulla ner till sektionen Databases och klicka på alternativet ”MySQL Databases”.

Bluehost cPanel MySQL Databases

Note: Din kontrollpanel för webbhotell kan se något annorlunda ut än screenshots. Du bör dock fortfarande kunna hitta en Database section med ett alternativ för att skapa en new database.

Ange bara ett namn på din database och klicka sedan på knappen ”Create Database”.

Bluehost cPanel create MySQL database

cPanel kommer nu att skapa en new database åt you. Efter det måste du rulla ner till MySQL Users section.

Ange sedan ett användarnamn och ett password för din nya användare och click på knappen ”Create User”. Se till att obs/observera användarnamnet och passwordet på en säker plats.

Bluehost cPanel add MySQL database username and password

Den nya användaren som you just skapade har fortfarande ej behörighet att arbeta i databasen. Låt oss ändra på det.

Rulla ner till section ”Add User to Database”. Först väljer du den användare av databasen som du skapade i dropdown-menyn bredvid fältet ”User”. Välj sedan den new database som du just har skapat och click på knappen ”Add”.

Bluehost cPanel Add user to database

Därefter kommer du att bli ombedd att välja behörigheter för användaren.

Välj ”All Privileges” och klicka på knappen ”Make Changes” för att fortsätta.

Bluehost cPanel MySQL database user privileges

Din database är nu klar och kan användas för att flytta WordPress till det nya domain name.

Se till att du obs/observerar databasens namn, användarnamn och password. Du kommer att behöva denna information i nästa steg.

Step-by-Step 3: Packa upp WordPress på ditt nya domain name

Nu måste du uploada Duplicator-filerna som du downloadade tidigare till ditt nya domain name.

I Duplicator-paketet ingår även din installation av WordPress. Det innebär att du inte behöver installera WordPress på din new domän.

Anslut först till ditt domain name med hjälp av en FTP-klient. När du är ansluten ska du se till att rotkatalogen på din website är helt tom.

Efter det kan du uploada filerna archive och installer till root directory. Denna anropas vanligtvis public_html.

Upload Duplicator files to new domain name

När båda filerna har slutförts att uppladdas är du nu redo att packa upp WordPress.

Öppna en new tab i webbläsaren och gå till följande URL:

http://example.com/installer.php

Glöm inte att ersätta example.com med ditt new domain name. Detta kommer att starta migreringsguiden för Duplicator.

Duplicator installer wizard

Installatören kommer att leta efter archive-filen och sedan automatiskt välja alternativ för dig på skärmen.

Rulla ner lite för att enter informationen för den database you skapade i föregående steg.

Duplicator add database info

Under det kommer Duplicator automatiskt att visa dig URL: en för din gamla domän och din nya domän.

Om allt ser bra ut klickar du på knappen ”Bekräfta” för att fortsätta.

Duplicator validate details

Duplicator kommer nu att försöka ansluta till databasen med hjälp av den information you providerade.

Utan problem kommer du att få en bekräftelse. Annars visas en varning med detaljer om hur du fixar det.

Duplicator validation passed

Klicka på knappen ”Nästa” för att fortsätta.

Duplicator kommer nu att börja importera din WordPress website. När det är slutfört kommer du att se ett success message med en knapp för Admin Login.

Duplicator migration finished

Duplicator kommer automatiskt att update URL:er till ditt new domain name. Du kan nu klicka på knappen ”Admin Login” för att slutföra nästa steg.

Step-by-Step 4: Ställ in permanenta 301 redirects

Nästa steg är att peka användare som anländer till ditt gamla domain name till den nya domänen. Detta görs genom att konfigurera 301 redirects.

301 redirects är mycket viktiga för sökmotorsoptimering och för användarnas upplevelse. Adding them will allow you to automatically redirect users and search engines to your new domain name.

Med andra ord, när någon landar på ett post eller en page på din gamla domän, kommer de automatiskt att redirectas till samma post eller page på din new domän istället för att se ett 404 error.

För att hålla dina omdirigeringar på plats måste du hålla din gamla WordPress-installation aktiv så att den kan fortsätta att redirecta till den new som du just har skapat.

Det finns två sätt att konfigurera redirects. Den första metoden är enkel och tar bara några click. Den andra metoden är obligatorisk för att du ska kunna editera filer manuellt.

Metod 1: Ställ in 301 Redirects med All in One SEO

För den här metoden behöver du All in One SEO (AIOSEO). Det är det bästa WordPress SEO-tillägget på marknaden och allow you att enkelt optimera din WordPress website för SEO.

Först måste du installera och aktivera pluginet All in One SEO på din gamla domän. För mer detaljer, se vår Step-by-Step guide om hur du installerar ett plugin för WordPress.

Note: Du behöver minst Pro-versionen av pluginet för att få tillgång till redirect manager addon. Du kan också konfigurera AIOSEO på din new WordPress site för att öka din search engine ranking och trafik ännu mer.

Efter aktivering på din gamla domän måste du besöka All in One SEO ” Redirects page och klicka på knappen ’Activate Redirects ’.

Activate redirects

Därefter måste du byta till tabben ”Full Omdirigera webbplats” och slå på ”Flytta webbplats” toggle.

Efter det måste du enter ditt nya domain name bredvid alternativet ”Relocate to domain”.

Full site redirect

Glöm inte att klicka på knappen ”Save Changes” för att spara dina inställningar.

Metod 2: Ställ in manuellt Redirects till ny domän

Denna metod kräver att du redigerar WordPress .htaccess-filen på ditt gamla domain name.

Först måste du ansluta till din gamla site med FTP och editera .htaccess-filen.

This will be located in the same directory as your wp-includes or wp-admin folder. Öppna .htaccess-filen och klistra in följande rader med kod högst upp:

#Options +FollowSymLinks
RewriteEngine on
Unchanged: RewriteRule ^(.*)$ http://www.newsite.com/$1 [R=301,L]

Se till att du ersätter newsite.com med din new domän i koden ovan.

När du har tillämpat dessa ändringar besöker du ditt gamla domain name. Den ska automatiskt redirecta you till den new domänen.

Om den inte gör det betyder det att redirecten inte är korrekt konfigurerad och att din server troligen inte har support för redirect-regler. You need to contact the support team at your web hosting company to get RewriteEngine turned on.

Step-by-Step 5: Meddela Google om din nya domän

Nu när du har flyttat WordPress till ett nytt domain name och ställt in redirects är det dags att meddela Google om din adressändring. Detta kommer att hjälpa Google att hitta din new website domän snabbt och börja visa den i sökresultaten.

Först måste du se till att både dina nya och gamla domäner läggs till i Google Search Console som två olika egenskaper. Se steg 1 i vår guide till Google Search Console för instruktioner.

Därefter måste du välja det gamla domain name som den aktiva egenskapen i din Google Search Console-kontos dashpanel.

Select old domain

Därefter klickar du på menyn Settings i den vänstra columnen.

Nu kan du klicka på verktyget ”Change of address”.

Change of Address

Nu måste du välja din nya domän från Update Google section.

Sedan ska du klicka på knappen ”Validate & Update”.

Add new address to change of address

Det är all. Google kommer nu att bekräfta att din gamla domän redirectar till den new domänen och save dina ändringar.

På nästa vy visar Google Search Console dig en Step-by-Step Wizard för att skicka in din request om adressändring.

Meddela dina användare om det nya domain name

Medan 301 redirects gör sitt jobb är det alltid bra att göra ett offentligt tillkännagivande om flytten.

Du kan göra detta genom att helt enkelt skriva ett blogginlägg om din new site och dela det på dina konton på social media.

Om du har prenumeranternyhetsbrev via e-post eller push notifications bör du skicka ut ett meddelande till dem också.

Detta kan vara till hjälp på många sätt.

Först och främst är det mer troligt att dina användare gillar att komma ihåg den nya domänen när de har läst om den.

För det andra kan du be dina användare att meddela dig om de ser några buggar. Du kan inte ensam testa din webbplats i alla typer av webbläsare eller systemmiljöer, så det är alltid bra att låta ett par nya ögon titta på den.

Bonusresurser

Följande artiklar och handledningar hjälper dig att spåra och återfå din SEO-ranking efter att du har flyttat till ett nytt domännamn:

Vi hoppas att denna handledning hjälpte dig att flytta din WordPress-webbplats till ett nytt domännamn. Du kanske också vill se vår guide om hur du får en gratis e-postdomän eller följa stegen i vår kompletta SEO-guide för WordPress.

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

508 kommentarerLämna ett svar

  1. Syed Balkhi

    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. Maya

    Should I keep all files on my old domain (the whole WordPress installation) or it is enough just to have .htaccess with 301 redirect?

  3. James

    Hi guys,

    The 301 redirect doest redirect the pages, what can I do?

    • Logan Cale

      I had a similar problem with the .htaccess redirect only redirecting the domain (front page), and not the sub-pages, but when I also added the line below in .htaccess file, all sub-pages were then redirected if they had the same exact name.

      Redirect 301 / https://newdomain.com/

      • Euan

        Hi Logan. You, my friend, are a legend. Several hours of searching as I had the same problem – the front page was redirecting but nothing else. I added this line of code and it is now sorted. Thank you!

  4. Kim Saxton

    Hi,
    This has been really useful thank you so much, but I am now a bit stuck.

    I got up to step 2 and ran the deployment button on the installer php site. Then I went away for a week, I made some formatting changes to my newsite (just colour, logo not any changes with pages).

    I now want to update my URLs on the installer update page. But I can no longer access it. It comes up with a 404 error page cannot be found. See
    My old site is

    Can you advise?
    Thanks
    Kim

  5. Sorin Vizireanu

    Excellent post, thank you.

  6. Ashley

    I have a question. We are a business and we just had an ecommerce shop built on our regular business website.

    We know would like to take just the shop and put that on a separate domain.

    How would that process work?

    • WPBeginner Support

      Hi Ashley,

      You will have to set up redirects in a way that only your shop URLs are redirected to the new domain name.

      Administratör

  7. Peter Ishola

    How do i download the package files? Do i have to download it from my wordress admin or from my cpanel because i cannot find any download link on my wordpress admin.

    Thanks

  8. Manpreet Singh Rehsi

    Hi,
    Thanks, for such a detailed article. This really helped to moving one of my blog to a new domain last month.

    Right now my blog is undergoing a move in google webmaster. Now I want to implement SSL on my new domain.

    Should I make a move to implement the HTTPS or wait for move to be completed in google webmasters.

    Will SEO will take a negative impact if I implement https now.

  9. Ahmed Rifshaan

    Hello,

    Regarding 301 Redirect you said, we should edit old .htaccess file…

    What if we dont change host, only changing the domain name?

    My site doesnt move, only the domain is changing..

    In that case what should i do?

  10. Jay Soriano

    There is one part that could use a little bit of clarification, and I read through most of the comments and couldn’t find an answer. With regards to the 301 redirect, in the post you mention:

    ”In other words, whenever someone lands on one of your old posts or pages, then they will be automatically redirected to your new site.”

    If they land on an old post (olddomain.com/post), will they be redirected to the post on the new domain (newdomain.com/post), or simply to the root domain (newdomain.com)?

  11. Claudio

    How long is it safe continue to keep the older domain and website, after you redirect to new one?

  12. Jo

    Hi, I don’t know if you can help me. I purchased a new domain name from my host. I followed the instructions in this article. When I logged into my FTP client I did so under my old domain name first of all (I think I thought I had to) and then on the ’new session’ tab I logged in under my new domain name. Under my new domain appeared to be all the same files as my old domain.

    The article said to make sure the root file was empty so I deleted all the files from the new domain name in the FTP client and uploaded the installer.php file and archive zip file.

    When it comes to launching the installer.php file in my web browser it comes up with a 404 error and now I’m stuck. Do you have any advice?

    Thanks!

    • Jo

      UPDATE: I finally managed to get onto the Duplicator and have added a new MySQL database and run the tests. However, now when I try to log in to update the permalinks using my same username and password it says it doesn’t recognise my details. I tried ’forgot password’ but it didn’t recognise my email.

      It’s also saying there is HTTP 500 error on my new (and old) domain names.

      Any advice would be great, please.

      Thanks!

  13. Amirhossein

    Hi

    I have a theme installed and active on my wp site right now:

    1. It has a custom post type called ”video_type”.
    2. The URL pattern of all video_type post are like this: mysite.com/video_type/the-video-name-url. It means the /video_type/ is always there in all video post URLs.
    3. There is another custom post type called ”genre”. Which acts as ”categories” but only for video_type posts.
    4. The URL pattern for ”genres” is like this: mysite.com/genre/the-genre-name-url. It means the /genre/ is always there in all genre URLs. And they contain video post lists.
    5. All of my videos and genres are indexed in google and they mostly rank very well. Some of them rank 1-3.

    Now I want to change the theme. The new theme does not recognize ”video_type” and ”genre”. And I don’t want theme to be recognized.

    I have decided to change the ”video_type” to ”post” with ”Post Type Switcher” plugin. But after changing type:
    1.”genre” is no longer available for posts (Only categories are available).
    2. And I cannot change the ”genre” post type to ”categories” with that Plugin.
    3. mysite.com/genre/the-genre-name-url genres will be pages with no content.
    4. The URL of the video posts changes. (there will be no ”video_type” in the URL and I don’t want it to be BUT SEO?)

    Here are my goals:
    1. change ”genre” to ”categories”.
    2. change the ”genre” URLs.
    3. change the ”video_type” to ”post”.
    4. change ”video_type” URLs.
    5. I also want to Prune and Optimize my current categories. (Remove, Add and Edit some of theme).

    So I want to know what is the best practice here for ”Not having any negative SEO”? And how to achieve these goals anyway?

  14. Michel Fortin

    If I have two different websites and we want to transfer one of them to the other one. The thing is that we want to close the first website now but transfer the content later, what would be the best practice on the redirect side?

  15. Michael Barth

    Thanks for that article, but my problem is a bit more complex. I have a 301 redirect for a domain name I use to a hoster for templates websites. I now have a new hoster and a WordPress site there. I will change my 301 to now redirect to my new wordpress site. I have no access to the htaccess file on the ”old” hoster, and need to cancel the contract anyway.
    Any idea how to best do that .
    Thank you.

  16. Sujeet Thakur

    Thanks a lot from bottom of my heart. My all problem are solved to read your blog. thanks again ..!

  17. saeed

    I am looking to safely migrate wordpress website to new html website without losing the google ranking. please contact

    • Sant

      Hi SAEED,
      Did you move your domain WordPress to HTML?

      I am planning my website to move from WordPress to HTML, I want to know is this effects any SEO?
      Please suggest on this?

      Thanks in advance!

  18. Alessandro Bertelli

    Hi.

    I am moving a site from a dummy/test subdomain to the definitive domain (something like moving from temporary.example.com to example.com.)

    While i kept the site mostly offline during developement i forgot for a brief period the site open.
    This was enough for googlebot to snuck in and i find many pages indexed already, with the addresses starting with temporary.example.com/whatever instead of example.com/whatever.

    Now i am going to put online the site on the real address and i fear that the fact that the same pages are indexed twice will damage SEO.

    I have no previous traffic or seo score to save from the test subdomain, can i just delete the old site?

      • Alessandro Bertelli

        Hi, thanks for the answer.

        As i said the site i want to move has no SEO to save… i am only worried of google thinking less of it because of the (temp and no more existing) duplicate pages.

        The redirect would be just for the search bots.
        Is a 301 redirect a better solution instead of just removing the site?

        • WPBeginner Support

          Even if you remove the site, you would still need to tell search engines where it has gone. This way search engines won’t penalize the new and live site for duplicate content. 301 is the HTTP code which tells search engines that the content they are trying to access has moved to this new location.

  19. Jeffrey Collins

    I simply made my site secure, changing the url. I have used a 301 redirect from the root, will that redirect all pages? This is a wordpress site.

  20. Ataul Ghani

    i just move the old domain to new domain. The process was something like that, just install wp to new domain and import all files and database on it. Then old domain made an permanent redirection to new domain. I shared sitemap to web master and other search engine also. Also old domain web master admin i said to change domain name by using domain name changer tools in web master. But still not remove any files from old domain directory, so is that will be problem for me??? lease let me know.

    Thank You!

  21. Rabin Mahmud

    Hello,
    I have a old site but I want to redirect that to new domain without losting my any permanent SEO juice. But I need to know that should I redirect all the urls of old domain to new site similar urls or I just need to redirect the domain Name.
    It’s very important for me to know.
    Thanks

  22. Ravi

    I have properly 301 redirected my site to new domain. Do i need to add sitemap of new domain after redirection and address change at webmaster tools? Also my site traffic has significantly gone down. Around 70% drop within 10 days. Is this normal? And how much time will it take to go up.

    Please answer and help.

  23. Sandy Gogoriya

    I want ask you one question. I have two website. One is old and one is new. so i want transfer my old website 5 post to my new website. Like on my old website have 5 smartphones post and i want publish these post on my new domain with old website content that already publish so what i do now.

  24. Ernest

    Hi, thank you for the great explanation! I am wondering, Does putting the code in the htacces file mean That i don’t need to redirect all individual links? I was looking at the plug-in 301 simple redirects, but there I need to fill in every single link.
    My old site is live for a while so I would like to keep the page values for Google.

    BR!

  25. Josh

    What should be done with the content on the original site after the duplicate content, all 301 redirects. and change of address in the search console are complete? Is it best to remove the original content? Any chance it will get penalized as duplicate content?

    • WPBeginner Support

      You don’t need to have the content live to set up a redirect from one WordPress install to another. But if you do, then that’s alright too, because your users and search engines won’t stay on the old content and they will be redirected. If your content was hosted on a platform like WordPress.com or Blogger, then we would recommend you to keep your content in private mode for at least six months.

      Administratör

  26. David Budimir

    Hi there,

    We’re migrating our blog from a blog.domain.com to domin.com/blog. Out site is currently live on our main domain, will migrate the blog to the same database mean we need to access it differently?

    In other words, will it affect our process for creating blog content in the wordpress dashboard?

    Thanks!

    • WPBeginner Support

      No, it wouldn’t affect blog creation. However, you may need to update URLs in database to make sure that they are pointing to the new location.

      Administratör

  27. sudhir

    Thanks WPBEGINNER team for writing such an awesome and helpful article. I have followed all steps carefully and migrated my old domain to new domain, everything is working fine except one, that is; my old home url is not redirecting to new one while all internal pages are redirectd to new pages.

  28. Michall Helmbæk

    THX for the best article in a long time that really works!

  29. suhan ahmed

    I want to move my https enabled site to a new https enabled domain for rebranding purpose. For example,
    From https olddomain.com
    To https newdomain.com

    To put 301 code to the .htaccess file of old domain. I need to keep the installation of old domain untouched.

    The problem is here I will need two SSLs, IPs (in some cases, servers) which is a bit costly for me.

    What can be the best solution here?

    Or

    Can I follow the below mention method!!!

    If I switch back to my https olddomain TO http olddomain
    and then from olddomain TO newdomain.

    Will I lose ranking or be penalized by Google here?

  30. roshan christy

    Hi.,
    This is article exactly something I was looking today but a bit confused now. My blog was hacked and was injected with a conditional redirect malware. Since my hosting provider allows two managed WordPress installs, I migrated the ’uploads’ folder and database to the other one. Now I wish to change the domain name too as the current one have many external spam websites indexed by Google as subdomains. I want to keep the old domain name but delete the old site with malwares. But this article is suggesting to keep the old website with the .htaccess edit. Can I use the old domain along with new one by deleting the old website?

  31. Leonardo

    Nice, thanks. It was very helpfull!

  32. New

    Hello
    If I just move my content wordpress to newsite as the same domain I am using, Is it neccessary to do 301 redirect?

  33. Rocky

    In new Google Webmaster Tools there is not any option of changes of address option. please tell me now how can i notify google.

  34. Joey Espinoza

    Great tutorial, thank you

  35. Aron Jay

    Does this work to specific posts or it will automatically redirect everything to the new domain.

    I’m planning to move some of my posts to another domain, not entirely the whole blog. Thanks!

  36. Michael J.

    Hi WPBeginner – Your step-by-step guide is great…but, I just have a quick question to confirm before moving forward with changing my wordpress domain…

    Unfortunately, the Duplicator Plugin is not working for me….so, can I manually copy & paste a backup of the my ’old’ site into a new directory for the ’new domain?…and follow the rest of the steps above.

    Also, I am using the same hosting for my old & new domain — So, do I create a new directory folder for the ’new’ domain — and keep the ’old’ domain folder on my hosting?…basically, my hosting would have (2) site folders?…the old & new.

    I’ve read various places say I only need to point to the new domain on wordpress…however, im extremely concerned with losing my SEO rankings from my old domain, so i’ve been kindda hesitant with the process..

    Any reply would be greatly appreciated…Thanks!

    • WPBeginner Support

      You should create a new directory on your hosting server. Download all your WordPress files and then upload them to the new directory. You will also need to export your old database. Create a new database in your hosting cPanel. Open phpmyAdmin and then import your old database. Rest of the steps would be the same.

      Administratör

      • Michael J.

        Thanks for the reply!…I will make sure to follow your detailed instructions.

  37. Bunty Pundir

    Hey,

    I created the package with Duplicator plugin and also, uploaded installer and archive package to new domain but unable to launch installer.php using example.com/installer.php and the browser showing server not found!

    Help please:-(

  38. Mihira

    Success!

    I was afraid to take up transfer of my domain from .in to .com since 6 months or more. This guide is so easy to follow, I was up and running in the new domain within an hour. Thank you wpbeginner for this helpful post.

    One question though… My old domain didnt have such a great SEO characteristics to pass on. I no more want to use that old domain. Can I set a 301 direct in .htaccess of old site and leave it WITHOUT RENEWING THE DOMAIN WHEN IT EXPIRES OVER THE PERIOD?

    Please let me know!

    • WPBeginner Support

      Yes, you can do that. However, it is recommended that you keep the domain up with redirects for at least 90 days. You should also submit a change of address request to Google from Google webmaster tools.

      Administratör

  39. Edward

    Another question: if I delete all the old images in the old site folder, google webmaster will tell me there`s 100,000 dead paths and I will have to delete them one by one. Should I just leave the image folder untouched? I don`t want to see all those missing file notifications in my webmasters account.

  40. Edward

    I will be keeping the same .com domain but the images in the old pages will have a different name. ( e.g. from 0429_lg.jpg to ocean_home.lg.jpg so I am changing the name of 10 images ( now will have twice that number ) on each listing with different name. Does that affect SEO? I guess having the new seo friendly name in images might even be better.

  41. Shreya

    Hi there !
    Recently I tried migrating my wp website to new domain ( shared server) but the Duplicator plugin didnt work . Then I opted for manual migration, everything is working well but I can’t aceess my wp-login.php page for my new website in new domain.

    Can you please help me on this matter ? I shall provide more details of both my websites too .

    Thanks .

  42. Zane

    Thank you! Followed instructions and worked perfectly.

  43. Duane Reeve

    I’m busy migrating a clients domain and a relatively old post on MOZ.com states one should redirect each URL independently. While MOZ is an industry leader in SEO, I’m questioning this since their post is from 2009. Is this overkill or the best way to proceed?

    • WPBeginner Support

      If you have a static site with less than 10 pages, then this makes sense. But if you are moving a site with hundereds of posts, then it will be quite difficult to setup each redirect manually.

      Administratör

      • Duane Reeve

        Thank You – Clients WordPress site had 36 pages/posts, which I redirecting manually using the Redirect Plugin. I then updated the sitemap and re-submitted this to both Google & Bing.
        I didn’t redirect image or tag URLs.

        After 48-hours, of doing the page/post redirects, I submitted the URL Address Change to both Google and Bing Webmaster Tools. I decided to give both Search Engine time to detect the Page/Post Redirects and will do a Domain Redirect (using .htaccess file) at the end of the week.

        Based on my Google Analytics & Google Webmaster Tools for the new Domain I’m pretty happy with the results so far.

      • Dario Fumagalli

        What Moz says is 100% safe, whereas what WPBeginner says has one big issue: the old website sitemap.

        Adding a sitewide 301, **also** redirects calls to the old sitemaps, whereas Google needs it to stay in there to prove both the old sitemap and the new one are same or similar.

        Therefore, if you do it the Moz way you are ultra-safe, if you do it the WPBeginner way you need to add exceptions to exclude all the old sitemap index (if any) and sitemap(s) until Google understand both refer to the same ownership.

  44. Mark D

    Hi, I don’t have an FTP provider. When I loaded one, it lit up my anti-virus software. I am trying to create a website for a friend based on my site. Is there an easy, non-FTP solution, to clone to my friend’s domain. Once that’s there, I can then update with her content.

    Thanks,

  45. Lynn Dye

    Is it a good idea to delete my old site (except for the .htaccess file), on my old host so I don’t have 2 exact sites on two hosts?

  46. Nelson

    Can your created a tutorial moving a wordpress site to a new doman wihout a plugin, like for example moving subcategory to the main site or subdoman to the mina site wihtout a plugin.

  47. Satish

    Hi, very useful article but i have a doubt . What if i download my backup manually by making zip, also download the database from Mysql from cpanel.

    And then manually upload to the new host filemanager. Do i need to change the URL in database from old-domain.com to new-domain.com before uploading the database to mysql?
    Hope you understand, what i’m saying!

  48. Daniel Ruyter

    Question on the redirects – I’m currently running two sites (two TLD’s, two hosts) and would like to consolidate into a single site, retiring the ”old” site host. Can I redirect the ”old” TLD to the new at the DNS and then add rewrite rules to my ”new” site’s .htaccess for the migrated posts?

    Thank you!

    -Daniel

  49. Lynn Dye

    This has worked well – question on the redirect. I changed my domain AND hosting. So I’d like to close out my old hosting account.

    How long should I have the redirect for my old domain? I’m planning on keeping the old domain for some time.

    Would a forward on the old domain accomplish the same thing as the 301 redirect?

    • Daniel Ruyter

      I’d keep the old domain name redirected as long as you’re able.

  50. Lynn Dye

    If I used BackupBuddy to move my site to a new domain and then followed the directions to do the 301 redirect, shouldn’t I get the same result

    What about typing in the old and new url that Duplicator has you do – how is that step done with BackupBuddy?

    Thanks for an interesting post.

  51. Katie Steckly

    So if I transfer my site with these exact instructions, with Google analytics automatically keep working? Or do I need to re-install the tracking code on my new site, and take it off the old one?

    • Travis Pflanz

      Google Analytics will still work as long as you use the same UA code as before. That said, it may be worthwhile to setup a new view in your Google Analytics dashboard after you make the change

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.