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. Saifullah Tamim

    Many Many thanks brother. This article is very helpful.

    • WPBeginner Support

      Glad our guide was helpful!

      Administrator

  3. Sajid

    for how many days I need to keep the old site running. For 301 redirection

    • WPBeginner Support

      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.

      Administrator

  4. James

    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

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

      Administrator

  5. ronald

    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

      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.

      Administrator

  6. thierry

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

    • WPBeginner Support

      Glad our guide was helpful!

      Administrator

  7. Mark

    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.

    • WPBeginner Support

      Glad our guide could help simplify the process in a way that worked for you :)

      Administrator

  8. Manas Patil

    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

      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.

      Administrator

      • Manas Patil

        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

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

  9. BIKRAMJIT KONWAR

    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?

  10. Amir

    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?

  11. Md Shuaib Raza

    Can i delete and cancle my old domain name by provoider after migration?

  12. Paco

    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.

  13. Hassan

    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?

    • WPBeginner Support

      The installer file would be what you downloaded from the Duplicator plugin.

      Administrator

  14. F NIc

    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

      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.

      Administrator

  15. Sachin

    I have a question, I have single web hosting, so how can I move from the old domain to the new domain?

    • WPBeginner Support

      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.

      Administrator

  16. Andy

    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

      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.

      Administrator

  17. Sharon

    Thank you so much for this tutorial it was so easy for me to redirect my old domain

    • WPBeginner Support

      Glad our guide was helpful :)

      Administrator

  18. amir

    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

      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.

      Administrator

  19. Dejan

    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

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

      Administrator

  20. dariu

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

    • WPBeginner Support

      You would use the same steps for a new host as well.

      Administrator

  21. Penny

    I had to put in mine in the public_html folder to work. Very frustrating at first until I tried that!

  22. Jose

    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

      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.

      Administrator

      • Jose

        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!

        • WPBeginner Support

          Glad you were able to get the issue sorted :)

  23. Haitham

    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

      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.

      Administrator

  24. Joe

    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

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

      Administrator

  25. Jay Dee

    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

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

      Administrator

  26. Rajesh

    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?

    • WPBeginner Support

      After you create your redirects you can remove the old content.

      Administrator

  27. Morgan

    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

      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

      Administrator

  28. Braeden

    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

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

      Administrator

  29. Marco

    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

      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.

      Administrator

  30. Gosia

    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

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

      Administrator

  31. Alexandre

    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

  32. Prasad Rane

    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.

    • WPBeginner Support

      Glad our guide could help :)

      Administrator

  33. Luiz Pedao

    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

      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.

      Administrator

  34. Razi

    Thanks, Buddy, After reading your article It’s just like the peace of cake

    • WPBeginner Support

      Glad our article could be helpful :)

      Administrator

  35. hassan

    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

  36. Adrian Filip

    Brilliant tutorial. Thank you! Work like a charm!

    • WPBeginner Support

      Glad you found our guide helpful :)

      Administrator

  37. Megan

    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

      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.

      Administrator

  38. Megan

    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.

    • WPBeginner Support

      You can move from a host to BlueHost’s basic plan following this guide

      Administrator

  39. Utsav

    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

      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.

      Administrator

  40. Suchitha

    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

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

      Administrator

  41. Adz

    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

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

      Administrator

  42. Ejimurphy

    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

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

      Administrator

  43. Mark

    Perfect! Thank you for a great post!

    • WPBeginner Support

      You’re welcome :)

      Administrator

  44. Joshua

    OK, I’m tracking with most of this guide, but what particular steps do I need to take if my website is hosted with HostGator, my old domain is registered with GoDaddy, and my new domain is registered with Domain.com? Do I have to link the new domain with HostGator hosting in some way before I can create a new database in Step 2?

    • WPBeginner Support

      You would normally want to point your domain’s nameservers to where the new domain would be hosted to link the domain to your host.

      Administrator

  45. Kay

    Thanks for these clear steps! I have one question. So I moved everything to the new domain name and have applied the 301 redirect at the old domain. Should I keep the pages and posts on the old domain or simply remove those? Because doesn’t google see those pages as copies now I’ve basically duplicated the website? Also, I thought it would free up some spaces if I remove them. However, I would love to hear what’s the best thing to do here.

    Extra info: I’m not planning to use the old domain anymore so once the subscription for that domain ends later this year I will not extend it.

    Thank you!

    • WPBeginner Support

      If you have moved all of the content over and created your redirects then you can feel free to remove the old site and its content

      Administrator

  46. Manuel

    Hi. I have two questions. The first is how long should the 1st step from the installer take? It’s been extracting the archive files for about 20 minutes and my site isnt that big.

    Also, is setting up the 301 redirects and updating google about the changes necessary if I’m only using the cloned site as a template for the new one? Any pages that are remaining the same will be deleted from the old site.

    Thanks in advance!

    • WPBeginner Support

      It would depend on the size of the site for how long it would take and the 301 redirects are to ensure traffic from your old site is sent to the new site rather than the old address that would not have the content anymore

      Administrator

  47. Darren

    I have never done this before, so your instructions were excellent. For any newbies like me – just go through slowly and read each instruction carefully and it will work perfectly.

    • WPBeginner Support

      Glad our guide was able to help you transfer your site :)

      Administrator

  48. Christopher Jan Benitez

    Great guide! I successfully moved my site to a new domain using the exact processalthough I have to purchase Duplicator Pro to make it work.

    My question is this: what should I do with the WordPress content on the old domain? Should I just uninstall/delete everything and leave the .htaccess file in there?

    • WPBeginner Support

      That would be a personal preference question, you certainly can remove it and leave the .htaccess as the simplest option :)

      Administrator

  49. Rohan

    Hii
    After changing domain name do I need to take apply for AdSense again? my previous domain already has AdSense approved. Do I need to reapply for a new domain name?

    • WPBeginner Support

      You would need to add the new domain to your sites list on your current AdSense account

      Administrator

  50. Mickey gee

    this is what i get after i uploaded the file successfully
    Error establishing a database connection

  51. Dileep kumar

    After Move WordPress to a New Domain , How can i change url in Adsense account. And any effect on my adsense earning becouse my blog 2 year old.

    • WPBeginner Support

      You would need to add your new domain to your sites list in your Adsense settings. For earnings, there are too many factors beyond the domain name for us to give you an idea about any changes.

      Administrator

      • sunil

        after adding a new domain in AdSense should I remove old domain from adsense?

        • WPBeginner Support

          If you no longer plan to use the old domain then you can remove your old domain from your Adsense.

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