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

    This absolutely worked for me :)

  3. Eben

    Hi, One simple question,

    Domain1.com (expired but files are there in CPanel of X Hosting)
    Domain2.com (new domain added to X Hosting and nameservers updated to point to hosting server)

    I simply want my Domain2.com to point to files or folder of Domain1.com in my hosting account

    pls tell how to do this..this is not answered clearly anywhere

    • WPBeginner Support

      Hi Eben,

      In your domain settings there is an option to select the root folder or home directory for that domain. You can use that option and point it to the directory that has your older domain’s files.

      Administrator

  4. Rafi

    Hi there,
    My website domain name has expired but I have a full backup of it using backup to dropbox. Now can I migrate the previous site to a new domain? If possible then what are the process?
    Thanks In Advance
    Rafi

    • WPBeginner Support

      Hi Rafi,

      Yes you can migrate it to a new domain name. The process actually depends on the backup you have. If you have complete WordPress backup then you can just upload it to your new domain name and then update URLs.

      Administrator

  5. sarah

    I enjoyed the article! I just wondered, what do i do if my new site is still being hosted with wordpress? there is no URL change either.
    I don’t think i’ll need to do any 301 redirects is that right?

    However, I am lost as to the steps i should take to move the traffic from A to B, does this depend on the DNS change? Would appreciate any advice!

  6. Logan Miller

    This is SUCH a helpful article.
    I’m currently stuck at the „sitename.com/installer.php” step. When I put this in the browser (but with my actual domain) I get a 404 error.
    The installer.php file is uploaded to my directory, so in theory it should work?

    I’ve double checked all the previous steps, and it seems to all be good, so I’m stuck.

    My first thought is that perhaps the dns nameservers haven’t fully propagated yet, and I’m being impatient.

    Anyone have an idea?

  7. Chris

    Hey guys great article. I actually merged 2 existing sites together and moved all the content from my subdomain site onto my main domain site.

    All data has been transferred across and I have setup the redirect using htaccess file. All the links appear to be redirecting correctly =)

    my question is, what should I do with the OLD wordpress install (files, database etc) located on the subdomain?

  8. Julie

    Great article! My question is similar but my client already has a new site hosted with blue host. Her old site is a wordpress.com site. She doesn’t need any of the content as she has completely finished the new site. My question is about the redirects from the old site. People still visit there and she’s got good rankings. What’s the best way to redirect the pages (urls) from her old wordpress.com site to her new self hosted site? No content or anything. Just the redirects.
    Thanks for all your help! You guys are the best!!

    • WPBeginner Support

      Hi Julie,

      The best way to redirect is by purchasing the Site Redirect addon from WordPress.com

      Administrator

  9. Shadhirsha

    Hi,
    I have a website with subdomain and I didn’t publish my main domain. when I trying to apply for adsense. it shows that you can’t register with subdomain.
    So I am trying to move my subdomain to main domain. But I have problems

    These are the problems below:
    1. I have register google analytics, google optimize, tag manager and webmasters and etc(SEOs) with subdomain
    2.Traffics and trackings

    So, Please help me to move my website safely

    • WPBeginner Support

      Hi Shadhrisha,

      Please see our article on moving WordPress from subdomain to root domain.

      You will need to create a new Google Analytics, Optimize, and Tag manager profile for the root domain as it is a different domain altogether. Same goes for webmaster tools, however you can inform Google by change of address in the webmaster tools settings for your old subdomain.

      Administrator

  10. Brian

    I had an idea for a website and instead of registering for a domain i just made a subdomain from one of my other sites. The idea has developed into something more now. I want to register a domain name and move everything to it and delete the subdomain. I don’t have that much content, I haven’t started it up yet. I could just delete the subdomain and populate the new domain manually. But I do have the subdomain in google analytics and search console. Would it hurt my new site if I did just delete the subdomain, register a new domain and start from there.

    • WPBeginner Support

      Hi Brian,

      If the site was not indexed by search engines or had no significant content, then it is safe to delete it.

      Administrator

  11. Mike Poepping

    This article makes sense for how to move an entire domain to a new address, but what would change in this process if I only wanted to move some content from one site to another?

    I’m working with a client who has a new site being developed (for a large national audience), so that their current site can focus on driving local leads only.

    I want to know how to get their highest performing blogs on to the new national site without losing the excellent keyword rankings we’ve achieved over the past couple of years on their current site (which is the site moving to the extremely local focus).

    Any tips and/or guidance would be greatly appreciated, thanks in advance!

  12. Sam

    unfortunately, I deleted all the old domain files including the .htacess file from the server without redirecting.Now I got my new domain and I don’t have my old domain files. could you please tell how can I redirect the users from old to the new domain in this situation? Else my domain will be penalized by Google which looks like duplication as I didn’t redirect.

    • WPBeginner Support

      Hi Sam,

      Assuming that you still have the old domain name registered, deleting the file only makes your website unavailable on your old domain. You can simply create a new .htaccess file in the old domain folder to set up redirects.

      Administrator

  13. Murali N

    Hi, my current WordPress is in root folder; now I want to create WordPress Network / Multisite with sub-folders.
    Can I move my current example.com to example.com/subfolder-1 following the above? OR, is there a simple way to do this?

  14. Alex

    Hi

    I want move a website to another domain however the structure is very different. The old website was created several years and hasn’t even submitted to google webmaster or console as it is now. What would be the best way to go around it.

  15. Joe G

    There are about a million unanswered questions that all ask the same thing:

    How long do you leave the old site up for?

    If you delete the old site files (to save backup space) will leave the edited .htaccess file in the old directory, will it continue to forward to the new site?

    Thanks.

    • WPBeginner Support

      Hi Joe,

      You should keep your old domain for at least 6 months. You can delete any old files via FTP without deleting .htaccess file.

      Administrator

  16. Abhay

    Hi,

    Thanks a lot for your post!

    I am using a domain abcd.com for my WordPress based website hosted on Bluehost and want to shift to wxyz.com. I have purchased this new domain.

    Now your article says „Next, you need to open your FTP program and connect to your new site. Make sure that the root directory, or the directory where you want to copy your website is completely empty. Upload the installer.php file and your package zip file to the new site.”

    What do you mean by „connect to new site”? As far as I read from your website, and FTP client is used to access files on your 'hosting’ and not 'domain’. How do I access the root directory of my new domain? I just have the domain name with me.

    I am not a pro with the website stuff so I contacted my domain provider, they said you can simply change the A name record and nameservers.

    I am stuck, please help me.

    • WPBeginner Support

      Hi Abhay,

      Domain names are addresses that point to files hosted on your hosting account. Please see our guide on the difference between domain names and web hosting to learn more.

      If your new domain is also hosted on Bluehost, then you can go to your domains settings and find out your root folder. It could be any folder inside your website’s root directory. Usually it is named after your domain name.

      Administrator

      • Abhay

        Hi,

        I am using the following service providers:

        Hosting: Bluehost
        Old Domain: Hostgator
        New Domain: Godaddy

        Now how to I access the root folder of my new domain?

        • WPBeginner Support

          Hi Abhay,

          First you will need to point your GoDaddy domain to Bluehost servers by changing its DNS settings. Next you will need to add your domain name to your Bluehost hosting account. Go to your hosting cPanel dashboard and click on Add Domains.

  17. Rob

    Hi!! Thanks for this!!

    I have a question though: Do I need to keep my old domain like forever? Until when should I wait to finally delete my old domain?

    • WPBeginner Support

      Hi Rob,

      We recommend keeping the old domain for at least 6 months. After that you can let it expire.

      Administrator

  18. Krunal

    Hi, I am trying to shift a blog between two domain hosted on the same server and with the same MySQL server versions. However while installing database i am getting a connection error and and reason mention in the message was the MySQL Version issue. Below is the exact message i am getting:

    NOTICE: The current version detected was released prior to MySQL 5.5.3 which had a release date of April 8th 2010. WordPress 4.2 included support for utf8mb4 which is only supported in MySQL server 5.5.3+. It is highly recommended to upgrade your version of MySQL server on this server to be more compatible with recent releases of WordPress and avoid issues with install errors.

    Any help in this regards is really appreciated.

    Thanks

  19. Joe G

    Everything worked perfectly with the move but what now?

    How long do you need to keep the old installation and will the redirect still work with just the edited .htaccess in the directory?

  20. Andreas Schueler

    Very helpful post, thank you. With your help, moving to the new domain was a breeze.

  21. Smith Andrews

    Firstly, thank for your great work….i want to migrate my site to a new domain in the same server…the old domain is in the public directory so will the new site be a subdomain or what im confused??

    • WPBeginner Support

      Hi Smith,

      You can point your domain name to any folder inside public_html. For example, you can create a new folder under public_html and name it after your new-domain.

      Administrator

  22. Adesanmi Franklyn

    Hi,
    Thanks for this awesome content. Please I want to know how long it will take Google to rank the new site as the old site. And also, would all the link juice of the old site be passed to the new site?
    Because the moment I changed the URL following this all traffic and post ranks drop. Now I’m wondering if it will take position again on search.

    • WPBeginner Support

      Hi Adesanmi,

      Please see the step 4. It allows you to tell Google that your website address has changed. The search rankings will start reappearing in sometime. Meanwhile, your 301 redirects will keep sending users to your new website.

      Administrator

  23. Tanya

    Thanks for this detailed post. I’m wondering why I need to duplicate the wordpress site. Why can’t I just change the domain for the current site without duplicating it? If I create a duplicate wordpress installation, it will exist in a subfolder, which is not ideal, especially for the link structure. Thanks in advance.

    • WPBeginner Support

      Hi Tanya,

      This method makes sure that your website is available on both locations during the transfer and before setting up permanent redirects.

      Administrator

      • Tanya

        Thanks for your reply. I have another question. If I use the Duplicator plugin, do I have to first create a database for the new site before I run the duplicator installer? Do you have instructions for doing this? The instructions above indicate that the installer should be put into a folder that is completely empty. That implies that I cannot first use the WordPress installer that comes with BlueHost to install WordPress (and I assume also creates the associated database). Thanks for your help.

        • WPBeginner Support

          Hi Tanya,

          Yes, you will need to create the database. We will soon update the article with more detailed instructions. Meanwhile, you can create a new database by visiting your hosting account’s Cpanel dashboard. Look for the databases section and click on MySQL Databases. You will first need to create a new database, after that you will need to create a new database user. Finally, you will need to add your new database user to your database.

  24. Micheal James

    how to do 302 redirect?

  25. Mikeal

    i have redirected my website but still i am having issues

  26. Castro

    Hey Wpbeginner, thanks for the article. How can i move my free domain under wordpress to a paid hosting and new domain name. Ive search everywhere but no clue. Thanks

  27. Kerry

    Hi Wp-Support,

    Thanks for such a great article. Though it’s was written months ago, it’s an evergreen article.

    However, my question is: I recently registered a new domain, in fact it is my first WordPress website. But it has not yet been indexed. Does the process you outlined here applies to my new site as well?

  28. Vince Hordemann

    Great article. I followed it step by step and it appears that my old site is now redirecting and that my Google Analytics and Webmaster Tools are all working too. Thanks!

  29. Georgia

    Hi!
    First of all I would like to congratulate you on your great, helpful and comprehensive posts. The steps seem really simple to follow.
    I want to ask something that is not yet covered, neither in the text, nor in your replies. Lets say that my current site is https://www.example.net (it already has a SSL certificate) and I want to redirect all pages to https://www.example.com ( https as well), without changing host provider.
    Which code should I use in .htaccess file? Should I do anything else?
    Thank you in advance!

  30. Manpreet Singh Rehsi

    Hi,
    What should we do with old domian name.

    For how much time one should keep old data as it is on the old domain.

  31. Jennifer

    Hi, I just purchased a new domain name and want to change the old domain to the new one. My worry now is, my current hosting does not have SSL cert and I am using the Cloudflare Flexible SSL. Do I need to put in redirect both http and https (even though I don’t have the cert in my hosting)?

    How about Cloudflare? Do I use the same account, edit it with new domain name or register a new account?

    Many thanks in advance.

  32. Brit

    Thanks for this. Does this only work for wordpress.org? I have wp.com and can’t seem to find the htaccess link and it looks like the only way to change my site name with the new domain is to pay to map it. Is this normal?

  33. kuber

    Hi,

    There is a question about my sitemap

    After submitting the new website’s sitemap to Search Console, the old website sitemap should be removed

  34. Rui

    Hi, thanks for your nice tutorial! Can you please clarify the best way to execute Step 4, when you have to migrate your site every 2 months or so due to having it blocked by the local authorities? Cheers

  35. Elise

    These directions helped me a lot! Thanks!

  36. Mick Lite

    If I change the domain, does all the stats in the blog stay like views and such?

  37. Russell Alexander

    My band has a sign up page (.net) and a website (.com). The .net is a redirect to a directory on the .com site, it’s not its own real domain. The .com is also a add-on domain of my main domain, so it’s like this:
    Main domain – add-on .com (as a folder of the main) – .net (a folder in the .com)

    I set up a WP site on my main domain. It put it in the root, even before the .www folder that has the main, the add-on, etc. But it has a specific path, so (finally) the question:

    Can I just change the redirect of the .net to the new WP install I’ve done? Sorry if this sounds like a Gordian knot, but that’s the best way I can explain it. I haven’t used WP much before, and I wanted to make sure it wouldn’t freak out being the subject of a redirect. As in, the plug-ins, Paypal, etc.. The redirect would really only affect the main landing page, where people sign up for the mailing list.

    Thanks for your help.

  38. Camila

    This article helps a lot thank you. I just have one question. I have my primary domain and the new domain and both point to the same root. When you type either domains they will go to the same homepage but of course all posts and pages are under the primary domain.

    This being said I’m not switching locations or anything. I mean the root file will remain the same I only need to switch is the domain name {with home and posts redirects of course}. So, do I need to do the whole duplicator step thing???

    This process is really scary for me!
    Any help will be appreciated.

    Kind regards
    Cami

  39. Chris ohrn

    For step 3 and step 4:

    if the site uses the same url, that should not be needed or?
    as well we got a 301 on our topp domain but don’t know how to remove it..
    The 301 is not there on the www. but without the www. it is there!

    A bit bizare and mindboggler..

    Thanks for thoughts:)

    • Swati Ohri

      Hi Team,

      I just moved from my old domain to a new one. I have a basic account on Bluehost hence the customer support team says I can’t add it as an addon domain to create 301 redirects. My old domain was 6 months old, now I have to again start from the very first step. Can you help me how I can fix this?

  40. Kristine

    Where I can find full service for domain migration?

    I need to migrating (rebranding) domain1.com to domain2.com with all of the contents and urls, also the subdomain. Looks like it’s a complicated job :(

    Thanks

  41. Hasi Aulia

    Hi there,

    I want to ask you, how about to redirect domain and change the paltform at the same times, I wanna move aaaa(dot)com (using blogspot custom domain) to bbbb(dot)com using wordpress self-host.
    What the best step to avoid losing my ranking at the search engine to do it?

    Thanks

  42. Logan Cale

    One question or factor typically not mentioned when you change a domain is how long does it take to get back your rank in Google, and the answer according to this article below is 2-6 months depending on what you do to improve it.

  43. Luiz Cent

    Thank you for publishing this article, I would not have remembered to notify Google of the change, I was simply going to resubmit the new site to index. Also have to make the change in GA!

    Much more work than anticipated but it’s done!

  44. Cliff

    First off, nice article very helpful.
    The question is how long do I need to leave the old site up? or can I delete the old site now that I have the new site up and running.
    Thanks in advance.

  45. hari kumar thapa

    I want to change my domain and move that WordPress to new hosting! will this have any effect only ranking? backlinks or like that?

    Any anyone suggests me any post how I can move my WordPress to Blogger completely?
    No just copy past I want to completely move into blogger.
    Is this possible?

  46. Pamela

    Is there a way to transfer Facebook comments from the old domain? I’m using facebook comments on my old website and would love to keep them on the new domain.

  47. Med

    Hi, I wan some help please

    My case is a little different

    I migrated content of my website example.com from blogger to WordPress with dedicated server and I decided to leave the first active until I finish the development of the wordpress version that has a provisional domain 'example. net’

    When I finished developing, I tried to permanently change the .NET domain name to .COM because I might lose all the search results from the search engines.

    How can I reach this goal and thank you

  48. Saimon Hossain

    Hello sir, i already change my site address in webmastertool, but now again i need to change the domain. so what should i do now?

  49. Emmanuel

    Good post, I am trying to move only partial content not the entire website. What is the best way to go about it and not lose SEO ranking?

  50. Emily Burnett

    Thanks so much for this post – very straightforward and helpful as I tackled something intimidating.

  51. Ryan

    Thank you!

    This content was exactly what I needed. Really really helpful.

    Much appreciated.

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