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

Jak łatwo przenieść WordPress do nowej domeny (bez utraty SEO)

Przeniesienie twojej witryny WordPress do nowej domeny to duży krok, który wymaga starannego planowania. Zmiana nazwy twojej domeny może mieć wpływ na rankingi SEO, więc ważne jest, aby przeprowadzić ten proces ostrożnie.

Chociaż tymczasowe wahania SEO są nieuniknione podczas migracji domeny, można zmniejszyć ich wpływ. Przy odpowiednim podejściu będziesz w stanie szybko odzyskać swój ruch i rankingi wyszukiwania.

W tym przewodniku przeprowadzimy Cię przez prawidłowy sposób przeniesienia WordPressa do nowej domeny bez utraty SEO.

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

Migracja twojej witryny WordPress na nową nazwę domeny może być przerażająca, ale nie musi. Jesteśmy tutaj, aby przeprowadzić Cię przez każdy etap tego procesu.

Możesz kliknąć dowolny z poniższych odnośników, aby przejść do konkretnego kroku migracji twojej witryny WordPress do nowej nazwy domeny:

Film instruktażowy

Subscribe to WPBeginner

Jeśli wolisz pisemne instrukcje, czytaj dalej.

Co należy wiedzieć przed zmianą domeny

Zanim zaczniesz, powinieneś wiedzieć kilka rzeczy.

Proces przenoszenia do nowej domeny będzie miał tymczasowy wpływ na twoje rankingi w wyszukiwarkach, ponieważ Google i inne wyszukiwarki będą musiały dostosować się do zmian.

Będzie to miało również tymczasowy wpływ na twój ruch z wyszukiwarek. Należy pamiętać, że jest to normalne i zdarza się wszystkim witrynom internetowym, które przechodzą na nową domenę.

Możesz jednak znacznie zmniejszyć wpływ na SEO, postępując zgodnie z tym przewodnikiem. Pokażemy ci właściwy sposób przenoszenia twojej witryny WordPress na nową nazwę domeny, konfigurowania odpowiednich przekierowań 301 i powiadamiania wyszukiwarek.

Należy pamiętać, że ten przewodnik nie dotyczy przenoszenia witryny WordPress na nowego hosta. Dotyczy on wyłącznie zmiany nazwy domeny. Chociaż proces jest podobny, istnieje kilka dodatkowych kroków. Te dodatkowe kroki pomogą ci zabezpieczyć twoje rankingi SEO i ruch.

Wreszcie, jeśli twoja stara witryna internetowa znajduje się na WordPress.com, musisz postępować zgodnie z instrukcjami w naszym przewodniku, jak przenieść się z WordPress.com na WordPress.org.

Kroki wstępne: Czego potrzebujesz, aby zacząć

W tym przewodniku zakładamy, że twoja witryna internetowa WordPress jest skonfigurowana na oldsite.com i próbujesz przenieść ją na newsite.com.

Zakładamy również, że posiadasz już konto hostingowe WordPress i jesteś zaznajomiony z panelem sterowania Twojego hostingu.

Będziesz także musiał wiedzieć, jak korzystać z klienta FTP, takiego jak FileZilla, lub jak edytować pliki za pomocą aplikacji Menedżer plików dostępnej w kokpicie twojego konta hostingowego.

Jeśli nie masz dostawcy hostingu lub chcesz zmienić dostawcę, zalecamy skorzystanie z Bluehost (świetny dla małych witryn + bezpłatna domena) oraz SiteGround lub WP Engine (świetne dla większych witryn lub sklepów internetowych).

Gdy masz już te rzeczy na miejscu, jesteś gotowy do rozpoczęcia procesu!

Krok 1: Utwórz pakiet Duplicator Twojej witryny WordPress

Pierwszą rzeczą, którą musisz zrobić, jest utworzenie pełnej kopii zapasowej twojej witryny WordPress.

Następnie użyjesz tej kopii zapasowej do utworzenia duplikatu twojej witryny internetowej, abyś mógł poprawnie skonfigurować przekierowania ze starej domeny do nowej.

Chociaż dostępnych jest wiele wtyczek do tworzenia kopii zapasowych WordPress, w tym poradniku będziemy używać Duplicatora.

Duplicator to najlepsza wtyczka do tworzenia kopii zapasowych i migracji WordPress. Używaliśmy jej do migracji niezliczonych witryn internetowych zarówno dla naszych własnych firm, jak i klientów. Przekonaliśmy się, że działa niezawodnie, nawet w przypadku bardzo dużych witryn internetowych.

Uwaga: Dostępna jest również bezpłatna wersja programu Duplicator, której można użyć do tej migracji. Zalecamy jednak uaktualnienie do płatnego planu, aby odblokować więcej funkcji, takich jak automatyczne tworzenie kopii zapasowych w chmurze, odzyskiwanie witryn internetowych jednym kliknięciem, łatwiejsze migracje i wiele innych.

Zacznijmy od zainstalowania i włączania wtyczki Duplicator na twojej starej domenie. Aby uzyskać więcej informacji, zobacz nasz przewodnik krok po kroku, jak zainstalować wtyczkę WordPress.

Po włączeniu wtyczka doda pozycję menu Duplicator w twoim panelu administracyjnym WordPress. Musisz kliknąć menu Duplicator, a następnie kliknąć przycisk „Utwórz nowy”, aby utworzyć nowy pakiet lub kopię twojej witryny WordPress.

Create a new Duplicator package

Duplicator zainicjuje teraz kreatora wstecznego i automatycznie przypisze nazwę do tego pakietu.

Kliknij przycisk „Dalej”, aby kontynuować.

Duplicator package name

Duplicator przeprowadzi teraz kilka testów, aby sprawdzić, czy wszystko jest w porządku. Jeśli wtyczka znajdzie problem, pojawi się ostrzeżenie z instrukcjami.

Jeśli wszystkie elementy są oznaczone jako „Dobre”, kliknij przycisk „Utwórz”.

Duplicator build package

Wtyczka rozpocznie teraz tworzenie pakietu Duplicator plików twojej witryny internetowej. W zależności od rozmiaru twojej witryny, proces ten może potrwać kilka minut.

Po zakończeniu pojawi się opcja „Pobierz”. Kliknięcie jej spowoduje wyświetlenie opcji pobrania obu plików lub pobrania osobno instalatora i archiwum (zip).

Duplicator download both files

Wybierz „Oba pliki”, aby pobrać je na twój komputer.

Plik archiwum to kompletna kopia twoich plików WordPress. Obejmuje on twoje motywy WordPress, ustawienia bezpośrednich odnośników, wtyczki, przesłane pliki i wszelkie inne pliki utworzone przez wtyczki WordPress.

Skrypt instalatora to plik PHP, który zautomatyzuje i uruchomi migrację WordPressa poprzez rozpakowanie pliku archiwum.

Krok 2: Utwórz bazę danych dla twojej nowej nazwy domeny

Przed przeniesieniem twojej witryny WordPress do nowej domeny, będziesz potrzebował nowej bazy danych SQL, aby rozpakować WordPress na nowej nazwie domeny.

Jeśli baza danych została już utworzona, można pominąć ten krok.

Aby utworzyć bazę danych, należy przejść na kokpit cPanel twojego konta hostingowego, przewinąć w dół do sekcji „Bazy danych”, a następnie kliknąć ikonkę „Bazy danych MySQL”.

Pokażemy, jak zlokalizować go na Bluehost, ale podstawowe instrukcje są takie same i powinny mieć zastosowanie do wszystkich dostawców hostingu.

Zaloguj się do kokpitu swojego konta Bluehost i kliknij przycisk „Ustawienia” pod swoją witryną internetową.

Bluehost site settings

W ustawieniach twojej witryny musisz przejść do karty „Zaawansowane”.

Przewiń nieco w dół do sekcji cPanel i kliknij „Zarządzaj”.

Bluehost cPanel

Spowoduje to otwarcie kokpitu cPanel.

Przewiń w dół do sekcji Bazy danych i kliknij opcję „Bazy danych MySQL”.

Bluehost cPanel MySQL Databases

Uwaga: Twój panel sterowania hostingu może wyglądać nieco inaczej niż na zrzutach ekranu. Jednak nadal powinieneś być w stanie znaleźć sekcję Bazy danych z opcją tworzenia nowej bazy danych.

Wystarczy podać nazwę twojej bazy danych, a następnie kliknąć przycisk „Utwórz bazę danych”.

Bluehost cPanel create MySQL database

cPanel utworzy teraz nową bazę danych. Następnie należy przewinąć w dół do sekcji Użytkownicy MySQL.

Następnie podaj nazwę użytkownika i hasło dla twojego nowego użytkownika i kliknij przycisk „Utwórz użytkownika”. Pamiętaj, aby zanotować nazwę użytkownika i hasło w bezpiecznym miejscu.

Bluehost cPanel add MySQL database username and password

Nowy użytkownik, którego właśnie utworzyłeś, nadal nie ma uprawnień do pracy na bazie danych. Zmieńmy to.

Przewiń w dół do sekcji „Dodaj użytkownika do bazy danych”. Najpierw wybierz utworzonego użytkownika bazy danych z menu rozwijanego obok pola „Użytkownik”. Następnie wybierz utworzoną przed chwilą bazę danych i kliknij przycisk „Dodaj”.

Bluehost cPanel Add user to database

Następnie zostaniesz poproszony o wybranie uprawnień dla użytkownika.

Wybierz „Wszystkie uprawnienia” i kliknij przycisk „Wprowadź zmiany”, aby kontynuować.

Bluehost cPanel MySQL database user privileges

Twoja baza danych jest teraz gotowa i może być użyta do przeniesienia WordPressa na nową nazwę domeny.

Zanotuj nazwę bazy danych, nazwę użytkownika i hasło. Informacje te będą potrzebne w następnym kroku.

Krok 3: Rozpakuj WordPress na twoją nową nazwę domeny

Teraz musisz przesłać pobrane wcześniej pliki Duplicator do twojej nowej domeny.

Pakiet Duplicator obejmuje również twoją instalację WordPress. Oznacza to, że nie musisz instalować WordPressa na twojej nowej domenie.

Najpierw połącz się z twoją domeną za pomocą klienta FTP. Po połączeniu upewnij się, że katalog główny twojej witryny internetowej jest całkowicie pusty.

Następnie można przesłać archiwum i pliki instalatora do katalogu głównego. Zazwyczaj nazywa się on public_html.

Upload Duplicator files to new domain name

Po zakończeniu przesyłania obu plików możesz teraz rozpakować WordPress.

Otwórz nową kartę przeglądarki i przejdź pod następujący adres URL:

http://example.com/installer.php

Nie zapomnij zastąpić example.com twoją nową nazwą domeny. Spowoduje to uruchomienie kreatora migracji Duplicator.

Duplicator installer wizard

Instalator wyszuka plik archiwum, a następnie automatycznie wybierze opcje na ekranie.

Przewiń nieco w dół, aby wpisz informacje dotyczące bazy danych utworzonej w poprzednim kroku.

Duplicator add database info

Następnie Duplicator automatycznie wyświetli adres URL twojej starej i nowej domeny.

Jeśli wszystko wygląda dobrze, kliknij przycisk „Zatwierdź”, aby kontynuować.

Duplicator validate details

Duplicator podejmie teraz próbę połączenia się z bazą danych przy użyciu podanych informacji.

Po pomyślnym zakończeniu wyświetli się komunikat Validation Pass. W przeciwnym razie zostanie wyświetlone ostrzeżenie ze szczegółowymi informacjami na temat poprawki.

Duplicator validation passed

Kliknij przycisk „Dalej”, aby kontynuować.

Duplicator rozpocznie teraz importowanie twojej witryny internetowej WordPress. Po zakończeniu pojawi się komunikat o powodzeniu z przyciskiem logowania administratora.

Duplicator migration finished

Duplicator automatycznie zaktualizuje adresy URL do twojej nowej nazwy domeny. Możesz teraz kliknąć przycisk „Admin Login”, aby wykonać kolejne kroki.

Krok 4: Ustaw trwałe przekierowania 301

Następnym krokiem jest skierowanie użytkowników odwiedzających twoją starą domenę na nową. Odbywa się to poprzez ustawienie przekierowań 301.

Przekierowania 301 są bardzo ważne dla SEO i doświadczenia użytkownika. Dodanie ich pozwoli na automatyczne przekierowanie użytkowników i wyszukiwarek na twoją nową nazwę domeny.

Innymi słowy, za każdym razem, gdy ktoś wyląduje na wpisie lub stronie w twojej starej domenie, zostanie automatycznie przekierowany do tego samego wpisu lub strony w nowej domenie, zamiast widzieć błąd 404.

Aby utrzymać przekierowania na miejscu, musisz włączyć starą instalację WordPress, aby mogła nadal przekierowywać do nowej, właśnie utworzonej.

Istnieją dwa sposoby konfiguracji przekierowań. Pierwsza metoda jest łatwa i wymaga zaledwie kilku kliknięć. Druga metoda wymaga ręcznej edycji plików.

Metoda 1: Skonfiguruj przekierowania 301 za pomocą All in One SEO

Do tej metody będziesz potrzebował All in One SEO (AIOSEO). Jest to najlepsza wtyczka WordPress SEO na rynku, która pozwala łatwo zoptymalizować twoją witrynę internetową WordPress pod kątem SEO.

Po pierwsze, musisz zainstalować i włączyć wtyczkę All in One SEO na twojej starej domenie. Aby uzyskać więcej informacji, zobacz nasz przewodnik krok po kroku, jak zainstalować wtyczkę WordPress.

Uwaga: Aby uzyskać dostęp do dodatku menedżera przekierowań, wymagana jest co najmniej wersja Pro wtyczki. Możesz również skonfigurować AIOSEO na twojej nowej witrynie WordPress, aby jeszcze bardziej zwiększyć rankingi wyszukiwarek i ruch.

Po włączaniu na twojej starej domenie, musisz przejść na stronę All in One SEO ” Redirects i kliknąć przycisk „Activate Redirects”.

Activate redirects

Następnie należy przejść do karty „Pełne przekierowanie witryny” i włączyć przełącznik „Przenieś witrynę”.

Następnie musisz wpisz twoją nową nazwę domeny obok opcji „Przenieś do domeny”.

Full site redirect

Nie zapomnij kliknąć przycisku „Zapisz zmiany”, aby zapisać twoje ustawienia.

Metoda 2: Ręczna konfiguracja przekierowań do nowej domeny

Ta metoda wymaga edycji pliku .htaccess WordPressa na twojej starej domenie.

Najpierw należy połączyć się z twoją starą witryną za pomocą FTP i edytować plik .htaccess.

Będzie on znajdował się w tym samym katalogu, co twój katalog wp-includes lub wp-admin. Otwórz plik .htaccess i wklej następujące linie kodu na samej górze:

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

Upewnij się, że w powyższym kodzie zastąpiłeś newsite. com twoją nową domeną.

Po wprowadzeniu tych zmian przejdź na twoją starą domenę. Powinna ona automatycznie przekierować Cię do nowej domeny.

Jeśli tak się nie stanie, oznacza to, że przekierowanie nie jest skonfigurowane prawidłowo, a twój serwer prawdopodobnie nie obsługuje reguł przekierowań. Musisz skontaktować się z zespołem pomocy technicznej w twojej firmie hostingowej, aby włączyć RewriteEngine.

Krok 5: Powiadom Google o twojej nowej domenie

Teraz, gdy przeniosłeś WordPressa na nową nazwę domeny i skonfigurowałeś przekierowania, nadszedł czas, aby powiadomić Google o twojej zmianie adresu. Pomoże to Google szybko znaleźć twoją nową domenę witrynową i zacząć wyświetlać ją w wynikach wyszukiwania.

Po pierwsze, musisz upewnić się, że zarówno twoja nowa, jak i stara domena zostały utworzone w Google Search Console jako dwie różne właściwości. Instrukcje znajdują się w kroku 1 naszego przewodnika po Google Search Console.

Następnie należy wybrać starą nazwę domeny jako włączoną właściwość w kokpicie Twojego konta Google Search Console.

Select old domain

Następnie kliknij menu Ustawienia w lewej kolumnie.

Teraz możesz kliknąć narzędzie „Zmiana adresu”.

Change of Address

Teraz musisz wybrać twoją nową domenę z sekcji Aktualizuj Google.

Następnie należy kliknąć przycisk „Zatwierdź i zaktualizuj”.

Add new address to change of address

To wszystko. Google potwierdzi teraz, że twoja stara domena przekierowuje do nowej domeny i zapisze zmiany.

Na następnym ekranie Google Search Console wyświetli kreator krok po kroku, aby przesłać twój wniosek o zmianę adresu.

Powiadom swoich użytkowników o nowej nazwie domeny

Podczas gdy przekierowania 301 wykonują swoją pracę, zawsze dobrze jest publicznie ogłosić migrację.

Możesz to zrobić po prostu pisząc wpis na blogu o twojej nowej witrynie i udostępniając go na swoich kontach w mediach społecznościowych.

Jeśli posiadasz subskrybentów newslettera e-mail lub powiadomień push, to do nich również powinieneś wysłać ogłoszenie.

Może to być pomocne na wiele sposobów.

Przede wszystkim, twoi użytkownicy z większym prawdopodobieństwem zapamiętają nową domenę, gdy już o niej przeczytają.

Po drugie, możesz poprosić swoich użytkowników, aby dali ci znać, jeśli zauważą jakieś błędy. Sam nie jesteś w stanie przetestować swojej witryny w każdym rodzaju przeglądarki lub środowiska systemowego, więc zawsze pomocne jest spojrzenie na nią świeżym okiem.

Zasoby bonusowe

Poniższe artykuły i poradniki pomogą ci śledzić i odzyskać twoje rankingi SEO po migracji do nowej nazwy domeny:

Mamy nadzieję, że ten poradnik pomógł ci przenieść twoją witrynę WordPress na nową nazwę domeny. Możesz również zapoznać się z naszym przewodnikiem na temat tego , jak uzyskać bezpłatną domenę e-mail lub postępować zgodnie z instrukcjami w naszym kompletnym przewodniku SEO 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.

Ujawnienie: Nasze treści są wspierane przez czytelników. Oznacza to, że jeśli klikniesz na niektóre z naszych linków, możemy otrzymać prowizję. Zobacz jak WPBeginner jest finansowany, dlaczego to ma znaczenie i jak możesz nas wspierać. Oto nasz proces redakcyjny.

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.

Najlepszy zestaw narzędzi WordPress

Uzyskaj BEZPŁATNY dostęp do naszego zestawu narzędzi - zbiór produktów i zasobów związanych z WordPressem, które każdy profesjonalista powinien mieć!

Reader Interactions

508 komentarzyZostaw odpowiedź

  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.

      Administrator

  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.

      Administrator

  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.

      Administrator

  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.

      Administrator

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

      Administrator

  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.

      Administrator

      • 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

Zostaw odpowiedź

Dziękujemy za pozostawienie komentarza. Pamiętaj, że wszystkie komentarze są moderowane zgodnie z naszymi polityka komentarzy, a Twój adres e-mail NIE zostanie opublikowany. NIE używaj słów kluczowych w polu nazwy. Przeprowadźmy osobistą i konstruktywną rozmowę.