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 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. Moinuddin Waheed says

    When we migrate our blog to the new domain name and all the files and database gets into its new domain , how long does it take for Google to know that it has to rank this new domain?
    Also old domain names have domain authority and new domain names will take time to build a domain authority, how does seo remain unaffected if we switch to new domain?

    • WPBeginner Support says

      The 301 redirects are what tell Google to take note of the new domain. There is no specific timeline for when Google will update but as Google crawls the 301 redirects it will redirect and update your listing in search results. While your old links rank they will also redirect to the new location.

      Administratör

      • Moinuddin Waheed says

        Thanks for the reply and clarification about the query.
        I think after some time of the full setup to the new domain, isn’t it prudent to completely close the old domain and focus on new domain.
        or is it better to let 301 redirect continuously redirects to the posts and page and in the meantime when we fully satisfy that all old domain requests are redirects to new one, only then we take decision to stop old domain.

        • WPBeginner Support says

          You would want to check the analytics for the old domain, if you are still getting a good amount of traffic to that domain that is being redirected then you would keep the old domain active, if you are not getting visits to your old domain you would then look to close it.

  3. WPBeginner Support says

    If you reach out to your host they can sometimes help and temporarily override their upload limits to get your files into your hosting.

    Administratör

  4. Moinuddin Waheed says

    for redirecting to new domain, it is better to use the plugin itself that you have suggested i.e all in one seo which is easy to do for all with no coding knowledge people.
    And as for accessing the .htaccess file and manually changing it to redirect is somewhat only technical expertise people will look forward to.

  5. Don says

    Hi, thank you so much for your guide. We our doing a rebranding resulting in a name change and new url. Our WP administrator will be doing the migration and 301 redirect. Aside from notifying our database and social media followers in our newsletter, I am wondering if we can create a landing page on the new site for the redirects that announces the rebranding, and then segues into the new site after a preset interval.

    • WPBeginner Support says

      If you wanted to instead of redirect 1 to 1 the articles, you could certainly redirect the entire site to a landing page.

      Administratör

  6. Unarine Leo Netshifhefhe says

    My website has been hacked and I haven’t really gotten time to fix it that much, I would like to know if this problem of it been hacked has some kind of effect on SEO? Does it affect it badly? And my website stops appearing?

    • WPBeginner Support says

      It would depend on if anything changed on the front-end of your site but it can have a negative effect on your site’s SEO.

      Administratör

    • WPBeginner Support says

      You would not use FTP for your domain, you would want to use the tools in either your domain registrar or hosting provider.

      Administratör

    • WPBeginner Support says

      There is no universal answer for every site, it would depend on your site and audience but if you wanted to be safe a year is normally long enough for users who would revisit your site to see the change especially if they check your site for seasonal content.

      Administratör

  7. James says

    Hello, I hope you are doing good. How about migrating a subdomain to a completely new domain name ? For example, migrating ”example.blog.com” to ”example.com”.

    • WPBeginner Support says

      You can still use this method for moving from a subdomain to a completely new domain :)

      Administratör

  8. ronald says

    we still are using our existing site for some things, but not for blogs. these were migrated. we set up 301 redirects and all working smoothly but curious… after migration, with 301 redirects all set up on old server, should we unpublish the posts on old server so they no longer are on old sitemap?

    • WPBeginner Support says

      If you plan to continue to use your old site for other uses then it would normally be best to remove the content you’ve set up redirects for.

      Administratör

  9. thierry says

    Thanks a lot for this piece, following thes instructions was really clear and everything went smooth without any problems thanks thanks and thanks!

  10. Mark says

    Thank you. I tried so many other plugins and techniques – none worked very well.

    Although crazy complex for a simple thing this is a great technique. After nuking my earlier attempts this one fixed everything. Fonts, images, thumbnails, etc.
    Thank you.

  11. Manas Patil says

    Hello, this article was of great help. Thanks a ton!

    But I’d to ask – since I’ve one SSL certificate, I thought I’d move the SSL from my old site to my new site. If I do move it, should it cause any errors while I redirect from my old site to new site?

    Thanks in advance!
    Manas

    • WPBeginner Support says

      You would want to check with your hosting provider as some have methods to help prevent any errors when changing domains on the same host if they only have one SSL certificate. In general, it should not cause any issues if set up properly.

      Administratör

      • Manas Patil says

        Thanks a ton! I managed to move my site completely. Towards the end of the Search Console part, is it necessary to submit the sitemap again – because I don’t see my previous sitemap submissions on my new domain property.

        • WPBeginner Support says

          If you haven’t submitted a sitemap for the new domain you would want to do so to help Google crawl your URLs :)

  12. BIKRAMJIT KONWAR says

    Hi, many thanks for the article. I have a confusion here, can I migrate my WordPress site to a new domain without migrating the existing theme as I want to change the theme?

  13. Amir says

    Hello
    After migration to new domain, how should i send new post on my site ? Send a new post on old domain or new domain?

  14. Paco says

    I’m moving to a new domain name, but I’m still going to use the old domain name for other purposes. I don’t want to redirect the entire oldsite to newsite. What’s the recommended way in this case? Thanks.

  15. Hassan says

    It helped me a lot, my question is in ftp I will enter my new domain name and user name and password, then you said the installer file and archive file the installer file is it the wordpress zipp file or something else?

  16. F NIc says

    Hi, thank you for this detailed guide. I intend to switch domain from Bluehost to GoDaddy and I am wondering if my wordpress website will be affected in terms of how it will look after the switch.

    • WPBeginner Support says

      Your hosting provider would not affect how your site looks, as long as there are no issues with the duplication process the site should look the same.

      Administratör

    • WPBeginner Support says

      If you are staying on the same host, you would first want to check with your hosting provider as some have tools to help with changing your site’s domain.

      Administratör

  17. Andy says

    I’m having a little trouble with Step 5. Notifying Google About the Change.

    When I filed the change of address (the Search Console seems to have changed since you wrote this post, but I figured out the new procedure OK), the validation failed because Google couldn’t fetch the home page for my old site.

    • WPBeginner Support says

      Thank you for letting us know, for this situation, you would want to point Google to your new site for it to test the redirects.

      Administratör

  18. amir says

    can I delete the old host and domain after I did all the steps? or I should renew the host and domain after then

    Thanks

    • WPBeginner Support says

      It is normally a good idea to redirect the old domain to the new one for some time but you can end the old hosting and still redirect the old domain if you wanted.

      Administratör

  19. Dejan says

    Hi Wpbeginner!

    Very good article as usual, i have a question just to double check, will all paths be changed? For example media links and so on? Thanks again

    • WPBeginner Support says

      Using this method, your links to images and other media should be updated as well.

      Administratör

  20. dariu says

    Thanks for this. What is the difference for migrating to new host (and domain)? Is there any difference in steps and instructions?

  21. Jose says

    Thanks for a great tutorial!

    I’ve ran into a quirk after following all the steps.

    My site redirects everything EXCEPT the content of the home page.

    I updated the name servers about two days ago.

    I did the redirection via .htaccess.

    I’m not sure where to look to troubleshoot the issue. Any direction is appreciated. Thanks again!

    • WPBeginner Support says

      We would recommend checking for any caching plugins as well as reaching out to your hosting provider for the most common reasons for that issue and your hosting provider can normally take a look from their end as well.

      Administratör

      • Jose says

        Following up.

        I was/am using W3 Total Cache.

        Before I migrated, I forgot to disable caching. And that caused issues.

        After the migration, I had to manually remove W3 Total Cache in order to get the new site working again.

        There was a section of caching code left over in the new .htaccess file.

        All has been good since then!

  22. Haitham says

    Hi,

    Great tutorial. I have to ask about the SSL redirects since it may cause issues for domains that use cloudflare for instant.

    So while adding the code on the .htaccess file in the old website how do I add a newwebsite.com/1$ to that command ?

    • WPBeginner Support says

      If you mean how to update your site to a new domain using a CDN like Cloudflare, we would recommend reaching out to the CDN you are using for their current methods for that kind of change.

      Administratör

  23. Joe says

    In the last step you mentioned ”notify google about the change”.

    But what if don’t notify Google about the change, just move the website to new domain, and remove all the pages from old domain (as my website is new and doesn’t have any organic traffic)?

    Is it valid?

    • WPBeginner Support says

      You can do that if you want but you would likely take a negative hit in your search engine rankings.

      Administratör

  24. Jay Dee says

    I have a question about subscribers the website who have created profiles. Would I have to do redirects for their individual profile pages ?

    • WPBeginner Support says

      If you are using the same systems then you shouldn’t need an additional redirect unless the tool you are using says so.

      Administratör

  25. Rajesh says

    I have a question, I already set 301 redirection, and all the request to the old site is redirecting, now my question is, when I can delete old site and its content permanenty?

  26. Morgan says

    Hello, please I’m confused on this sentence ”Once connected, make sure that the root directory of your website is completely empty.”

    How can make the root directory to be empty cause is showing some files and folders. Please I need an answer on how to do that. Thanks

    • WPBeginner Support says

      You can either use FTP or some hosts have file managers you can use to delete the folders or you can reach out to your host for assistance

      Administratör

  27. Braeden says

    Thanks for this! How would you handle domain1 is moving to domain2, but, many of the URL slugs on domain1 are different on domain2. For example, domain1/this-is-a-post/ will be going to domain2/this-is-the-new-post/

    • WPBeginner Support says

      It would depend on the specific changes but depending on how drastic the change you may need to manually set up the individual redirects.

      Administratör

  28. Marco says

    Thank you for this guide. It helped me.

    I tried the 301 redirect on htaccess. However it only redirects the homepage. Any chance for help? Thanks

    • WPBeginner Support says

      You may want to try clearing your caching and checking with your hosting provider to ensure they don’t see any errors on their end.

      Administratör

  29. Gosia says

    This is great if moving a complete old site to a new domain. But what to do to when you are setting up a new site and want to move over only a few posts from the first site? I don’t want to lose organic traffic.

    • WPBeginner Support says

      You can check under Tools>Export and select the specific posts you want to transfer to your site.

      Administratör

  30. Alexandre says

    Thanks a lot for this tuto.
    I don’t understand why we have to set up permanent 301 redirects if I keep the same domain name ?

    Thank for your answer,

    Alex

  31. Prasad Rane says

    Hey thanks a lot for this step by step tutorial.I was able to move clients site in just 30 mins. He was surprised. Thanks a lot.

  32. Luiz Pedao says

    Hello, got a bit of a problem here. I transferred my good php and zip files to the public directory, and yet when I browse to mydomain/installer.php it just doesn’t find the page. What could be the problem?

    Thanks in advance

    • WPBeginner Support says

      You may want to reach out to your hosting provider to ensure the domain is set up to the correct location that you’re adding the files.

      Administratör

  33. hassan says

    GOOD guide.
    but if I want to change my URLs in a new domain

    my post in the old domain is: oldedoman.com/best-products-2020/
    I want to change to newdomain.com/best-products/

    How to redirect all my posts
    Thanks

  34. Megan says

    Does this process work with a bluehost basic account? I have purchased my new domain but can’t assign it as an Addon domain since I can only have 1 website. What is the best way to work with this?

    • WPBeginner Support says

      If you’re unable to create an addon domain we would recommend reaching out to your host and some offer support or different ways to set it up.

      Administratör

  35. Megan says

    Does this method work if I am using the Bluehost Basic plan where I can only have one website? I can’t make my new domain an add on domain.

  36. Utsav says

    Hi,
    I have questions that where to use 301 redirect, in new domain .htaccess or old domain .htaccess.
    In my case I have changed my website domain as well as web hosting. Then where to apply 301 redirect and how many time I should active my old domain and hosting active?

    • WPBeginner Support says

      You would want to add 301 redirects to the old domain. It depends on your old site and personal preference for how long you should keep the old domain active but you shouldn’t need the old hosting.

      Administratör

  37. Suchitha says

    I earlier had my domain in a WordPress site that I do not own. I developed my website there. Now, I have moved my domain to a new WordPress site that I own and also used the Export/Import option to transfer my content to the new site. However, I am having to re-design my website again. Does the procedure mentioned here ensure that my site is transferred intact?

    • WPBeginner Support says

      The method in this guide should let you keep your theme and plugins how they are set up.

      Administratör

  38. Adz says

    Hi, thanks for sharing.

    Once I’ve successfully migrated my old website to the new domain, will the 301 redirect continue to redirect even after ive deleted my old website? The reason I’m asking is because I have several posts on facebook that point to my old site.

    • WPBeginner Support says

      As long as the redirect remains in your htaccess file it will continue to redirect to your site.

      Administratör

  39. Ejimurphy says

    After moving the the old site to new site, do I still need to purchase new SSL certificate or the SSL certificate for old site will work for the new site

    Thanks!

    • WPBeginner Support says

      Most hosts should offer Let’s Encrypt as a free option but you would need to set up SSL for your new domain.

      Administratör

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.