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 utworzyć witrynę pomostową dla WordPress (krok po kroku)

Jeśli chodzi o wprowadzanie aktualizacji lub znaczących zmian w twojej witrynie WordPress, robienie tego bezpośrednio może być ryzykowne. W tym miejscu pojawia się witryna testowa.

Jest to idealny klon twojej działającej witryny internetowej, w którym możesz bezpiecznie testować zmiany, rozwiązywać problemy i udoskonalać aktualizacje przed wdrożeniem ich na głównej witrynie. Stworzenie witryny testowej może uchronić cię przed potencjalnymi przestojami, niedziałającymi funkcjami i innymi komplikacjami.

W WPBeginner używamy witryn przejściowych do testowania aktualizacji witryn internetowych przed opublikowaniem ich na naszych witrynach rzeczywistych.

W tym przewodniku krok po kroku pokażemy, jak łatwo utworzyć środowisko przejściowe dla twojej witryny WordPress. Omówimy kilka różnych metod, a większość z nich wymaga tylko kilku kliknięć.

How to create a staging site for WordPress

Co to jest witryna testowa?

Witryna testowa to klon twojej działającej witryny internetowej, który służy do testowania zmian przed ich uruchomieniem. Witryny pomostowe pomagają wychwycić błędy, dzięki czemu nie zepsujesz swojej działającej witryny internetowej.

W przeszłości skonfigurowanie witryny pomostowej WordPress było bardzo trudne, ale teraz to się zmieniło, więc nawet osoba nietechniczna może to zrobić.

Wielu użytkowników instaluje WordPressa lokalnie na swoich komputerach z systemem Windows lub Mac, aby przetestować zmiany. Po zakończeniu aktualizacji po prostu przesyłają te zmiany z lokalnego hosta na serwer na żywo.

Największym problemem tego podejścia jest to, co jeśli coś, co działało na twoim lokalnym serwerze, nie działa na serwerze live?

Często witryny regionalne i serwery hostingowe WordPress na żywo nie działają w tym samym środowisku.

Ponieważ witryna tymczasowa działa na twoim serwerze WWW, możesz łatwo uniknąć wszystkich tych błędów, ponieważ działa ona w tej samej konfiguracji serwera, co twoja witryna na żywo.

Mając to na uwadze, przyjrzyjmy się, jak skonfigurować witrynę pomostową dla WordPress.

Jak łatwo stworzyć witrynę WordPress Staging Site

Istnieje wiele sposobów na utworzenie witryny testowej dla WordPress. Najprostszym z nich jest skorzystanie z wbudowanej funkcji witryny przejściowej dostawcy hostingu.

Niektóre z najlepszych firm hostingowych WordPress oferują już witryny internetowe z funkcją 1-click staging. Jeśli twoja witryna internetowa jest hostowana przez jedną z nich, możesz łatwo utworzyć witrynę pomostową bez żadnych kłopotów.

Jeśli nie masz jednego z tych popularnych rozwiązań hostingowych, mamy również rozwiązanie, które pomoże Ci stworzyć witrynę przejściową WordPress za pomocą wtyczki (a nawet ręcznie).

Aby przyspieszyć przeglądanie, możesz skorzystać z poniższej nawigacji, aby przejść do sekcji, która najbardziej Ci odpowiada:

Tworzenie witryny testowej na Bluehost

Bluehost jest jedną z najlepszych firm hostingowych WordPress. Oferują szybkie rozwiązanie 1-click staging witryny we wszystkich swoich planach.

Najpierw musisz przejść do kokpitu twojego Bluehost i przejść do sekcji „Moje witryny”.

Następnie przejdź do karty „Wtyczki” i przełącz przełącznik obok opcji „Wtyczka Bluehost”.

Turn on Bluehost plugin

Następnie przejdź do kokpitu twojej witryny WordPress i przejdź na stronę Bluehost ” Staging.

Teraz kliknij przycisk „Utwórz witrynę testową”.

Click create staging site button

Bluehost przygotuje teraz środowisko przejściowe dla twojej witryny internetowej.

Po wykonaniu tej czynności wyświetlona zostanie sekcja „Witryna testowa”, w której należy zaznaczyć pole „Nie jest obecnie edytowana”.

Click not currently editing button

Na twoim ekranie zostanie wyświetlony monit z prośbą o przejście do witryny przejściowej.

Następnie kliknij przycisk „Przełącz”.

Click switch button

Po przełączeniu na ekranie pojawi się przycisk wskazujący, że pracujesz na witrynie internetowej.

Możesz kontynuować pracę nad twoją witryną internetową bez obawy, że będzie to miało wpływ na twoją witrynę na żywo.

Activate theme on staging site

Wdrażanie zmian z witryny Staging do witryny Live na Bluehost

Gdy będziesz gotowy do przeniesienia zmian z wersji testowej do witryny na żywo, po prostu przejdź do strony Bluehost ” Staging z panelu bocznego administratora WordPress.

Z tego miejsca zobaczysz rozwijane menu opcji wdrażania obok twojej witryny internetowej. Możesz wdrożyć tylko pliki, tylko bazę danych lub wdrożyć wszystkie zmiany.

Jeśli nie masz pewności, kliknij przycisk „Wdróż wszystkie zmiany”, aby kontynuować.

Choose the Deploy All Changes option from the Staging Site option

Następnie kliknij przycisk „Wdróż witrynę” znajdujący się obok rozwijanego menu.

Spowoduje to wyświetlenie wyskakującego okienka, w którym zostaniesz poproszony o potwierdzenie, że chcesz wdrożyć witrynę testową w witrynie produkcyjnej. Kliknij przycisk „Deploy”, aby kontynuować.

Click the Deploy button in the prompt

Bluehost rozpocznie teraz wdrażanie Twojej witryny tymczasowej do witryny na żywo. W zależności od rozmiaru Twojej witryny internetowej może to chwilę potrwać.

Możesz teraz przełączyć się z powrotem na twoją witrynę internetową, aby zobaczyć zmiany w działaniu, klikając przycisk Radio pod opcją Witryna produkcyjna.

Switch to the Production Site

Klonowanie witryny produkcyjnej do wersji Staging

Teraz, gdy przełączysz się z powrotem na witrynę produkcyjną, wszelkie zmiany, które tam wprowadzisz, nie zostaną automatycznie zsynchronizowane z twoją witryną pomostową.

W przyszłości, jeśli będziesz chciał przetestować więcej rzeczy na witrynie pomostowej, będziesz musiał zduplikować twoją witrynę internetową.

Aby to zrobić, należy przejść na stronę Bluehost ” Staging i kliknąć przycisk „Clone to staging”.

Click Clone to staging button

Następnie Bluehost sklonuje najnowsze zmiany w Twojej witrynie internetowej na żywo do witryny przejściowej. Następnie można przełączyć się na tymczasową witrynę internetową w celu testowania i rozwoju.

Tworzenie witryny testowej na SiteGround

SiteGround to kolejna czołowa firma hostingowa WordPress oferująca funkcję 1-click staging w swoich planach GrowBig i GoGeek.

Jeśli twoja witryna jest hostowana przez SiteGround, to w ten sposób skonfigurujesz witrynę internetową.

Najpierw musisz logować się do kokpitu SiteGround i przejść do karty Witryny internetowe. Następnie należy wybrać Narzędzia witryny znajdujące się pod twoją witryną internetową.

SiteGround dashboard

Na następnym ekranie należy kliknąć menu WordPress ” Staging z lewej kolumny.

W tym miejscu wybierz swoją witrynę internetową, a następnie podaj nazwę kopii testowej.

SiteGround make a staging copy of your website

Kliknij przycisk „Utwórz”, aby kontynuować, a Siteground utworzy tymczasową kopię twojej witryny internetowej.

Następnie należy kliknąć przycisk „Przejdź do zabezpieczonych adresów URL”, aby zabezpieczyć hasłem twoją witrynę internetową i zachować jej prywatność.

Siteground staging site created

Na następnym ekranie Siteground automatycznie wprowadzi adres URL i ścieżkę do twojej witryny internetowej.

Musisz wpisz nazwę użytkownika i hasło, których chcesz użyć do zabezpieczenia twojej witryny.

Protect staging website

Kliknij przycisk „Zabezpieczony”, aby zapisać twoje ustawienia.

Możesz teraz wrócić do strony WordPress ” Staging i kliknąć przycisk „Loguj się do panelu administracyjnego” obok twojej witryny internetowej.

Login to your staging website

SiteGround otworzy teraz obszar administracyjny WordPress twojej witryny internetowej. Możesz przetestować twoje zmiany na tej witrynie internetowej.

Wdrożenie zmian z powrotem do twojej aktywnej witryny internetowej

Po wypróbowaniu twoich zmian na witrynie pomostowej, możesz chcieć połączyć je z witryną internetową na żywo.

SiteGround również to ułatwia.

Wystarczy kliknąć menu WordPress ” Staging w lewej kolumnie. Następnie kliknij menu z trzema kropkami obok twojej witryny w sekcji „Zarządzaj kopiami Staging”.

Deploy all changes from staging to live website

Menu wyświetli dwie opcje wdrożenia. Możesz wybrać opcję „Full Deploy” lub „Custom Deploy”.

Opcja „Full Deploy” łączy wszystko z witryny pomostowej z twoją witryną internetową. Opcja „Custom deploy” pozwala wybrać pliki lub dane, które mają zostać scalone.

Jeśli nie masz pewności, wybierz opcję „Full Deploy”.

SiteGround skopiuje witrynę testową na twoją witrynę internetową.

Łączenie Live z twoją witryną internetową Staging

Zmiany wprowadzone w twojej witrynie internetowej nie są automatycznie kopiowane do witryny testowej.

Za każdym razem, gdy musisz pracować nad twoją witryną internetową, powtórz powyższy proces, aby utworzyć nową witrynę internetową.

Tworzenie witryny Staging na WP Engine

WP Engine to najlepsza zarządzana przez WordPress firma hostingowa na świecie. Zarządzany hosting WordPress to usługa concierge dla twojej witryny WordPress, w której dostawca hostingu dba o aktualizacje, kopie zapasowe, zabezpieczenia i wydajność.

WP Engine oferuje rozwiązanie staging jednym kliknięciem we wszystkich swoich planach. Jeśli korzystasz z WP Engine do hostowania swojej witryny internetowej, w ten sposób skonfigurujesz środowisko pomostowe dla swojej witryny.

Najpierw musisz logować się do twojego kokpitu WP Engine. Następnie przejdź do strony „Witryny” i wybierz swoją witrynę internetową, klikając na nią.

WP Engine sites

Spowoduje to przejście do kokpitu twojej witryny internetowej.

Teraz musisz kliknąć odnośnik „Add Staging” w lewej kolumnie lub wybrać go pod nazwą twojej witryny u góry.

Click to add staging environment in WP Engine

Spowoduje to przejście do ekranu „Dodaj środowisko”.

Zostaniesz poproszony o wybranie sposobu, w jaki chcesz kontynuować pracę ze swoim środowiskiem testowym.

Copy existing environment to staging site

Oto, co robi każda z tych opcji:

  • „Rozpocznij od nowej pustej witryny” tworzy nową pustą witrynę.
  • „Zacznij od przewodnika” tworzy nową witrynę z przewodnikiem i treścią demonstracyjną.
  • Opcja „Kopiuj istniejące środowisko do tej witryny” spowoduje skopiowanie twojego środowiska produkcyjnego lub deweloperskiego do tej witryny (np. skopiowanie działającej witryny do tego środowiska).
  • „Przenieś istniejące środowisko” przenosi środowisko do tej witryny (np. przenosi środowisko programistyczne do Staging).
  • „Zacznij od witryny WooCommerce” tworzy nową witrynę WordPress z preinstalowanym WooCommerce.

Ponieważ chcemy utworzyć kopię testową naszej działającej witryny internetowej, musimy kliknąć opcję „Skopiuj istniejące środowisko do tej witryny”.

Choose environment you wish to copy

Po wybraniu środowiska wybierz najnowszą kopię zapasową, którą chcesz skopiować, a następnie kliknij przycisk „Dalej”, aby kontynuować.

Teraz musisz podać nazwę twojej witryny testowej. Nazwa ta będzie używana w adresie URL twojej witryny przejściowej. Następnie wybierz STG (staging) jako twój rodzaj środowiska.

Staging site name

Kliknij przycisk „Utwórz środowisko”, aby kontynuować.

WP Engine utworzy teraz witrynę testową. Następnie zostaniesz przekierowany do kokpitu twojego środowiska Staging.

Password protect your staging environment

Następnie należy kliknąć przycisk Kłódka, aby włączyć ochronę hasłem dla twojej witryny pomostowej.

Następnie należy przejść do karty „Narzędzia”, aby skopiować nazwę użytkownika i hasło do Twojej witryny.

staging site password

Możesz teraz kliknąć przycisk „WP Admin” u góry, aby logować się do twojej witryny internetowej.

Możesz swobodnie wprowadzać zmiany i wypróbowywać funkcje w witrynie internetowej, tak jak w typowej witrynie WordPress, którą instalujesz gdziekolwiek indziej.

login to staging website

Wdrażanie zmian z witryny Staging do witryny Live na WP Engine

Chcesz połączyć zmiany wprowadzone w witrynie pomostowej z twoją witryną internetową na żywo?

Wystarczy kliknąć przycisk „Kopiuj środowisko”, aby rozpocząć wdrażanie.

Copy staging environment

Spowoduje to przejście do strony opcji. W tym miejscu należy wybrać twoje środowisko źródłowe i docelowe dla kopii.

Tutaj wybierzesz twoją witrynę internetową jako środowisko źródłowe, a witrynę produkcyjną lub działającą jako środowisko docelowe.

Deploy options

Możesz wybrać, co chcesz skopiować. Można na przykład skopiować wszystkie tabele i pliki bazy danych, określone pliki i tabele bazy danych lub tylko system plików.

Uwaga: Jeśli skopiujesz wszystko, utracisz wszelkie dane przechowywane na twojej działającej witrynie internetowej po użyciu jej do utworzenia środowiska przejściowego. Może to obejmować ważne dane, takie jak nowe wpisy, strony, klienci i zamówienia. Dobrym pomysłem jest więc wykonanie kopii zapasowej twojej działającej witryny przed wdrożeniem jej ze środowiska staging.

Następnie kliknij przycisk „Sprawdź i potwierdź”, aby rozpocząć wdrażanie. Skopiowanie wszystkiego na twoją witrynę internetową zajmie chwilę.

Po zakończeniu procesu otrzymasz powiadomienie e-mail.

Tworzenie witryny Staging przy użyciu wtyczki WordPress

Jeśli twój dostawca hostingu WordPress nie udostępnia funkcji witryny przejściowej, nadal możesz utworzyć witrynę przejściową za pomocą wtyczki WordPress.

Korzystanie z tej metody ma pewne wady.

Po pierwsze, wtyczka będzie miała ograniczoną kontrolę nad twoim serwerem hostingowym. Z tego powodu może nie zawsze dawać najlepsze wyniki.

Po drugie, wtyczka, której będziemy używać, będzie przechowywać twoją witrynę testową na własnych serwerach. Jeśli Zamierzasz dbać o prywatność i ochronę danych, może to nie być dla Ciebie idealne rozwiązanie.

Wreszcie, wtyczka ma kilka znanych niezgodności. Sprawdź ich stronę niezgodności, aby upewnić się, że twoja witryna jest zgodna [może być też „kompatybilny”].

Mając to na uwadze, zobaczmy, jak utworzyć witrynę WordPress typu staging przy użyciu wtyczki WordPress.

Pierwszą rzeczą, którą musisz zrobić, jest zainstalowanie i włączanie wtyczki WP Stagecoach. Aby uzyskać więcej informacji, zapoznaj się z naszym przewodnikiem krok po kroku, jak zainstalować wtyczkę WordPress.

Po włączaniu wtyczka doda nowy element menu o nazwie WP Stagecoach do twojego paska administratora. Kliknięcie go spowoduje przejście do strony ustawień wtyczki.

Enter WPStagecoach API keys

Będziesz musiał wpisz swoją nazwę użytkownika WP Stagecoach i klucz API, który znajdziesz na swoim koncie w witrynie internetowej wtyczki.

Następnie musisz przejść na stronę WP Stagecoach ” WP Stagecoach i wybrać nazwę Twojej witryny przejściowej. Nazwa ta będzie również używana jako subdomena Twojej witryny internetowej WordPress.

Connect WP Stagecoach

Nie zapomnij zaznaczyć pola obok opcji „Zabezpiecz witrynę tymczasową hasłem”. Zabezpieczy to twoją witrynę internetową przed publicznym zobaczeniem i wyszukiwarkami.

Kliknij przycisk „Jazda dyliżansem”, aby kontynuować.

WP Stagecoach progress

Wtyczka utworzy teraz kopię zapasową twoich plików WordPress i bazy danych, aby wyeksportować je do witryny testowej.

Może to trochę potrwać w zależności od rozmiaru twojej witryny internetowej WordPress.

Po zakończeniu zobaczysz odnośnik do twojej witryny testowej i jej obszaru administracyjnego.

WP Stagecoach fiinished creating a staging site

Możesz kliknąć odnośnik, aby przejść na twoją witrynę pomostową i rozpocząć na niej pracę.

Na pasku administratora u góry pojawi się jasnopomarańczowe powiadomienie wskazujące, że pracujesz nad twoją witryną testową.

WPSC staging preview

Wdrażanie witryny Staging do Live przy użyciu WP Stagecoach

Gdy będziesz już gotowy do importowania zmian na twoją witrynę, przejdź do strony WP Stagecoach ” Importuj zmiany i kliknij przycisk Sprawdź zmiany.

Check for changes

Wtyczka sprawdzi teraz zmiany na twojej witrynie testowej, a następnie wyświetli opcje ich importowania.

Do wyboru są wszystkie zmiany, zmiany w plikach lub zmiany w bazie danych.

Changes options

Wtyczka pokaże postęp importowania i powiadomi o jego zakończeniu.

Możesz teraz przetestować swoją witrynę na żywo, aby sprawdzić, czy wszystkie zmiany zostały pomyślnie zaimportowane.

Ręczne utworzenie witryny pomostowej dla WordPressa

Ta metoda nauczy cię ręcznie tworzyć witrynę pomostową dla twojej instalacji WordPress. Jest ona przeznaczona dla zaawansowanych użytkowników i wymaga więcej pracy niż inne metody opisane powyżej.

Inną wadą tej metody jest to, że twoja witryna internetowa będzie tymczasowo niedostępna podczas wdrażania zmian z serwera staging na serwer rzeczywisty.

W związku z tym zobaczmy, jak ręcznie utworzyć środowisko przejściowe dla twojej witryny WordPress.

Po pierwsze, musisz utworzyć subdomenę dla twojej witryny internetowej. Jeśli korzystasz z Bluehost, przejdź do kokpitu swojego konta hostingowego i przejdź do karty „Zaawansowane”.

Następnie kliknij przycisk „Zarządzaj” obok opcji „cPanel”.

Click Manage button next to the cPanel option

Spowoduje to otwarcie cPanelu w nowej karcie, w której należy przewinąć w dół do sekcji „Domena”.

Następnie kliknij opcję „Domeny”.

Click the Domain option in the cPanel

Spowoduje to otwarcie listy wszystkich domen na Twoim koncie hostingowym. W tym miejscu należy kliknąć przycisk „Utwórz nową domenę”.

Gdy to zrobisz, na ekranie otworzy się nowa strona, na której musisz wpisać twoją subdomenę, a następnie nazwę domeny w polu „Domena” w następujący sposób:

subdomena.example.com

Następnie wystarczy kliknąć przycisk „Prześlij”, aby zapisać twoje ustawienia.

Create a sub domain

Uwaga: Na naszych przykładowych zrzutach ekranu używamy Bluehost, więc twój ekran może wyglądać inaczej.

Twój panel kontrolny hostingu doda teraz twoją subdomenę, której możesz użyć do importowania witryny WordPress na żywo.

Następnie należy zainstalować i włączyć wtyczkę Duplicator na twojej witrynie. Jeśli potrzebujesz pełnych funkcji, możesz uzyskać wersję premium Duplicator tutaj.

Po włączaniu należy kliknąć menu Duplicator w twoim panelu bocznym administratora WordPress i kliknąć przycisk „Utwórz nowy” w sekcji Pakiety.

Create new Duplicator package

Następnie zostaniesz poproszony o kliknięcie przycisku „Dalej”, aby kontynuować. Duplicator uruchomi teraz kreator duplikatora witryny internetowej.

Najpierw uruchomi kilka testów, aby sprawdzić, czy wszystko jest w porządku. Jeśli wszystkie elementy są oznaczone jako „Dobre”, kliknij przycisk „Buduj”.

Duplicator build package button

Wtyczka rozpocznie teraz tworzenie pakietu Duplicator dla twojej witryny WordPress. Proces ten może potrwać kilka minut w zależności od rozmiaru twojej witryny internetowej.

Po zakończeniu wyświetlone zostaną opcje pobierania instalatora i pakietu archiwum. Musisz kliknąć przycisk „Pobierz oba pliki”, aby pobrać oba pliki na twój komputer.

Download Duplicator package and installer to your computer

Będziesz musiał przesłać oba te pliki do katalogu plików właśnie utworzonej subdomeny. Aby uzyskać szczegółowe informacje, zobacz nasz przewodnik na temat korzystania z FTP do przesyłania plików do twojej witryny internetowej WordPress.

Następnie twoja nowa witryna WordPress będzie potrzebowała nowej bazy danych. Utwórzmy ją.

Przejdź do panelu sterowania twojego konta hostingowego WordPress i przejdź do karty „Zaawansowane”.

Następnie przewiń w dół do sekcji „Bazy danych” i kliknij znajdujący się obok przycisk „Zarządzaj”.

Click the Manage button next to the Database option

Jeśli nie korzystasz z Bluehost, to twoje środowisko hostingowe WordPress może wyglądać nieco inaczej. Nie martw się i po prostu poszukaj sekcji Bazy danych.

Spowoduje to przejście do strony „Bazy danych MySQL”, gdzie możesz zacząć od podania nazwy twojej bazy danych.

Następnie kliknij przycisk „Utwórz bazę danych”.

Click create database button to create a  Staging site database

Następnie musisz utworzyć użytkownika MySQL dla twojej bazy danych.

Przewiń w dół do sekcji Użytkownicy MySQL i podaj nazwę użytkownika i hasło dla twojego nowego użytkownika bazy danych.

Database username and password

Teraz musisz nadać temu użytkownikowi uprawnienia dostępu i modyfikacji utworzonej wcześniej bazy danych.

Wystarczy przewinąć w dół do sekcji „Dodaj użytkownika do bazy danych” i wybrać twoją bazę danych oraz użytkownika, którego właśnie utworzyłeś.

Add user to database

Następnie kliknij przycisk „Dodaj”, aby kontynuować.

Zostaniesz poproszony o wybranie uprawnień dla użytkownika. Zaznacz pole wyboru „Wszystkie uprawnienia”, a następnie kliknij przycisk „Wprowadź zmiany”.

Manage user privileges

Teraz twoja baza danych jest gotowa do użycia w witrynie internetowej.

Następnie należy otworzyć nową kartę przeglądarki i wpisz subdomenę twojej witryny w następujący sposób:

https://yoursubdomain.example.com/installer.php

Nie zapomnij zastąpić yourubdomain rzeczywistą subdomeną, a example.com twoją własną nazwą domeny.

Spowoduje to uruchomienie kreatora instalacji programu Duplicator.

Enter database details

W sekcji „Konfiguracja” instalator poprosi cię o wpisz informacji o twojej bazie danych WordPress.

Twoim hostem będzie prawdopodobnie localhost. Następnie wpiszesz dane bazy danych, którą utworzyłeś dla swojej nowej domeny we wcześniejszym kroku.

Kliknij przycisk „Validate”, aby upewnić się, że Duplicator może połączyć się z twoją bazą danych.

Duplicator validated

Po zakończeniu kliknij przycisk „Dalej”, aby kontynuować.

Duplicator rozpakuje teraz twoją bazę danych i pliki WordPress i zaimportuje je do witryny testowej.

Po zakończeniu zostanie wyświetlony komunikat o powodzeniu.

Duplicator wizard finish

Możesz kliknąć przycisk „Admin Login”, aby wpisz obszar administracyjny WordPress twojej witryny internetowej na nowej witrynie pomostowej.

Teraz masz już skonfigurowaną twoją witrynę testową. Możesz ją zabezpieczyć, dodając ochronę hasłem do subdomeny.

Przejdź do kokpitu swojego konta hostingowego i przejdź do karty „Zaawansowane”.

Następnie przewiń w dół do sekcji „cPanel” i kliknij znajdujący się obok przycisk „Zarządzaj”.

Click the Manage button next to the cPanel option

Spowoduje to otwarcie cPanelu w nowym oknie, w którym należy przewinąć w dół do sekcji „Pliki”.

Następnie kliknij ikonkę „Prywatność katalogu”.

Click on the Directory Privacy option in the Files section

Następnie należy wybrać katalog subdomeny, a następnie zaznaczyć opcję „Zabezpiecz hasłem ten katalog”.

Zostaniesz poproszony o podanie nazwy tego ustawienia, a następnie kliknij przycisk „Zapisz”.

Configure directory privacy settings to password protect staging site

Twoja witryna tymczasowa będzie teraz zabezpieczona hasłem, dzięki czemu nie będzie dostępna dla wyszukiwarek i osób postronnych.

Możesz teraz pracować nad twoją witryną pomostową i wprowadzać w niej wszelkie zmiany.

Ręczne przeniesienie witryny Staging do trybu Live

Gdy będziesz gotowy do wdrożenia zmian z twojej witryny tymczasowej na serwerze rzeczywistym, wykonasz te same kroki opisane powyżej.

Wystarczy utworzyć nowy pakiet Duplicator na twojej witrynie i pobrać pliki instalatora i archiwum na swój komputer (patrz instrukcje powyżej).

Następnie musisz udać się do twojej witryny na żywo i utworzyć pełną kopię zapasową WordPress (możesz również użyć Duplicatora, aby utworzyć pełną kopię zapasową).

Po zakończeniu będziesz musiał usunąć wszystkie pliki i katalogi WordPress z twojej witryny internetowej na żywo. Oznacza to, że twoja witryna WordPress będzie przez jakiś czas niedostępna.

Na koniec postępuj zgodnie z powyższymi instrukcjami, aby uruchomić kreator instalatora Duplicator i importować witrynę pomostową na serwer rzeczywisty.

Jak widać, ostatnia metoda wcale nie jest najlepsza. Jest wiele rzeczy podczas tego procesu, które mogą uszkodzić twoją witrynę.

Sugerujemy unikanie tej metody za wszelką cenę, chyba że nie masz innego wyboru. Zalecamy korzystanie z niezawodnego dostawcy hostingu, takiego jak Bluehost, SiteGround lub WP Engine z wbudowanymi funkcjami staging site.

Mamy nadzieję, że ten artykuł pomógł ci dowiedzieć się, jak łatwo utworzyć środowisko przejściowe dla twojej witryny WordPress. Jeśli napotkasz jakieś problemy, zapoznaj się z naszym przewodnikiem po poprawkach najczęstszych błędów WordPress. Możesz również dowiedzieć się, jak korzystać z WordPress Playground w twojej przeglądarce do testowania.

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

205 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. Jiří Vaněk

    I recomend WP Staging plugin. This is really awesome plugin, with all feature you need for live website and copy as staging website. I use it for this purpose all the time and I must say, it is „must have” plugin.

  3. Moinuddin Waheed

    Staging site is a must have feature for anyone who is working for clients and .asking websites and blogs for clients.
    it is really helpful as there is always requirements for some tweak at the time of development of the website.
    Plugin option and the other doing manually is the only option for my client as I am using hostinger and there is not showing any staging website feature there.
    Does any of the hostinger plan not have built in staging feature like that of bluehost and siteground?

    • WPBeginner Support

      You would want to check with the hosting provider’s support for what they have currently available.

      Administrator

    • Jiří Vaněk

      You can use any hosting you want, becouse for staging purpose exist awesome plugin. Look on plugin with name WP Staging. This is all you need.

      • Moinuddin Waheed

        Thank you for the suggestion, This will be very useful as it is needed very often.
        I will explore this plugin and see to it for the functionality it has at its end.

  4. Chip Bearden

    There IS a downside. I followed all the steps for BlueHost and made a number of changes to my home page. Worked perfectly on the staging site.

    When I pushed it to production, my home page was a disaster. A few changes made it through but most did not. Worse, much of the content on the production site was trashed or even missing.

    Panicky, I put the production site into maintenance mode to prevent users from seeing it. Then BlueHost’s tech support did a great job of moving the staging site to production for me and cleaning up a bunch of other problems that resulted. It took a long, tense 90 minutes before everything was back, mostly, to what I wanted. I just had to change some internal links and menu items that still pointed to the staging site.

    Start to finish I was only down a couple of hours. The BlueHost customer support rep was wonderful but didn’t have a good explanation of what went wrong. Suffice it to say I’ll NEVER use staging again!

    • WPBeginner Support

      Thank you for your feedback, we’ll look to make it more clear in the article but unless you sync changes like posts, they will not go to your staging site and if you overwrite your live site with your staging it won’t include your new content. For your design it would heavily depend on what you’re using on your site as that should normally include any design changes.

      Administrator

  5. Audra

    Is this something that can be used to test out a new theme? Can I keep my current website live and work on a new theme at the same time?

    • WPBeginner Support

      Yes that is one of the more common reasons to use a staging site.

      Administrator

    • Jiří Vaněk

      It’s one of the reasons why I use staging. When there’s a request to change the website’s design, a copy of the website is created where all the necessary adjustments are fine-tuned, and then the changes are easily transferred to the live version. It’s much more practical than copying the website to a subdomain and performing subsequent migration, which can be quite complicated.

  6. Sharlene

    HI there. Is there a way to test the speed on a staging site please?

  7. Carol Henrichs

    Should I use the staging site just for plugin updates and such? Can I update pages and posts in staging then push to live? Otherwise I have to create a new staging site prior to every plugin/update test.

    • WPBeginner Support

      You would want to use a staging site for major plugin and design updates for your site. Updating pages and posts is normally something you would do on your primary site and you can do minor updates safely as long as you have a backup of your site from before the update.

      Administrator

  8. Kevin

    Do the Staging URLs (for posts and pages) automatically change once you hit deploy? I am worried that I am going to have a ton of 404 errors and ruin my SEO.

    • WPBeginner Support

      Unless we hear otherwise, the URLs should update so they are not 404s.

      Administrator

  9. Philippe

    I want to create a sandbox, I’m using WordPress on Bluehost, however I don’t have the Bluehost entries on my wordpress admin menu, and I can find no sandbox wizard directly on the Bluehost site. Where do I go from here?

    • WPBeginner Support

      You may have removed the plugin that added that, if you reach out to your host they should be able to assist.

      Administrator

  10. Jana Boswell

    This worked like magic. I seriously could not live without wp beginner. My hosting service does not have a staging option, so I followed the instructions for manual set-up, no problems, everything went smoothly! Thanks for the great instructions!

    • WPBeginner Support

      Glad our guide was able to help :)

      Administrator

  11. Desmond Sim

    after creating the staging site…how do you sync data between the staging and test site….the test site is used for updates and checking…whereas….the live site has new inputs from its users….

    Is there a plugin you can recommend syncing databases when each database has two different pieces of new info,

    • WPBeginner Support

      We do not have a recommendation for that at the moment as it is very difficult for a tool to know what specifically to sync or not.

      Administrator

  12. Brandon

    How does a person just delete a staging site? I believe I backed up the staging site with updraftplus, but if I back up the staging site with updraftplus, does it also back up the regular website too or vice versa?

  13. S

    so this manual staging does not work?

    so how do users target 'installer.php’ if the subdom URL is 'staging.blahwebsite.com’, then.

    • WPBeginner Support

      The method should still work, you would target the installer in the staging site’s subdomain. If you are having trouble with setting up or targeting the subdomain you may want to reach out to your hosting provider for their assistance.

      Administrator

  14. Brandon

    I used the manual method to set up a staging site for testing out updating plugins before they break something. Well, something broke in the staging site. How do I go back to the original configuration of the staging site?

    • WPBeginner Support

      If you did not create a backup for the staging site then you would delete the staging site and recreate it as one option.

      Administrator

  15. Ben

    Looks like there’s a chunk missing for the manual staging site creation. No upload of files for Duplicator.

    • WPBeginner Support

      Thank you for sharing that, we will look into updating the article when we are able

      Administrator

  16. Ankur

    I use bluehost hosting and they say they don’t recommend the beta version. So, the local host is the best option for me. Isn’t it?

    • WPBeginner Support

      If they do not recommend beta for your site, you can use local as an alternative.

      Administrator

  17. Jay

    If I have new blog posts on the original production site, what will happen I push the staging site to the production site later in the future?

    • WPBeginner Support

      The new content would be removed, we would recommend importing all new content to the staging site before overwriting the live site.

      Administrator

  18. KIZITO

    Hello friend.
    Just today, I mistakenly activated the staging mode (I’m a newbie tho) and there wasn’t any more option.
    Later I came on, I couldn’t login to my wordpress. It returns an error message that I can’t login to a site that’s on staging mode.
    I contacted bluehost, that did all they can, yet my site still says it’s on staging mode and I can’t login my wordpress.
    What do I do please?

  19. Alice

    Hi,
    Thanks for this. I have WP engine and my WordPress theme got d-registered because I am using it on the stage environment and dev.
    What’s the workaround that?

    thank you

    • WPBeginner Support

      You would need to reach out to your specific theme’s support for their workaround for this situation

      Administrator

  20. Jim Jones

    Hi I made changes in my WP Production site but not in the staging area. I want to reset my staging area to look like my Production site, or failing that delete my Staging area and start again. How can i do this?

    • WPBeginner Support

      It would depend on the method you used but if you made changes to the live site’s design then the simplest method would be to remove the current staging site and create it again.

      Administrator

  21. Jeff

    Great article. I really learned a lot.

    I have a question, please, about the manual method:

    Is it required to password protect the directory of the subdomain in cPanel, since the admin access to the website is already protected by a password?

    Thank you very much.

    • WPBeginner Support

      While not required, it helps prevent your users from trying to access the staging site :)

      Administrator

  22. Mujeeb

    In that staging site
    I want to give someone details to do something on my staging site, but I don’t want him to know my live site password, but is the Same thing with my live site. How can I do that

    • WPBeginner Support

      You would create a new user for them on your staging site for what it sounds like you want to do and you can remove that staging user later.

      Administrator

  23. Beulah Wellington

    If I download WAMP on my computer and use the localhost, couldn’t install the UpdraftPlus plugin and let that be my staging site? Isn’t this another alternative?

  24. Jan Stetson

    I’m trying to set up a staging environment on my WordPress site hosted by Bluehost. I’m stopped at step one! when I go to the WordPress admin area, I don’t see bluehost at the top of the page. The topmost option in the nav menu on the left is „Dashboard”. No sign of „Staging” anywhere. Help?

    • WPBeginner Support

      You likely removed the BlueHost plugin, if you reach out to BlueHost’s support they should be able to let you know their current methods available :)

      Administrator

  25. Shashank Sachan

    Hello
    I tried but did not succeed. Getting error ” this site can’t be reached”.
    I am on Godaddy and using Cloudflare. And I have not created a separate FTP account.

  26. simona

    thank you for the article. one question: If I update WordPress ONLY on the staging site, will it affect also my live-site?
    thank you for your answer. regards, s.

    • WPBeginner Support

      No, if you update one site it should not affect the other.

      Administrator

  27. oshibiko

    Thank you for this article.

    Do you know of a way to test membership (loginlogoff ) functionality without going live on the actual site. In the staging environment or developing. TIA

    • WPBeginner Support

      You would likely need to create a test user for you to log in with to test that.

      Administrator

  28. Mark E

    Great article, with one step missing for the manual instructions.
    After downloading the duplicator files to your computer, you then have to upload the installer file and archive file to your newly created subdomain directory.
    Otherwise when you try to run the installer you get a 404 page.
    Otherwise great guide!
    Thanks….

    • WPBeginner Support

      Thank you for pointing that out :)

      Administrator

  29. Charlene Marsh

    No option to try the staging feature on Bluehost yet. Message says „Please contact support to find out how to enable staging.” I was just on the phone with Bluehost about another issue and the rep I was speaking with never heard of this new feature.

    • WPBeginner Support

      It would depend on what rep you were talking to as it is a new feature so not all reps may be knowledgeable yet

      Administrator

    • Matt Stephen

      To be able to use the staging feature provided by Bluehost, you must install and activate the Blushost plugin.

  30. Sean

    Thank you for this great info, as always. Now is this something I could use to play around with a new page builder? I want to test out Thrive Architect but want to do so without messing anything up. Or, suppose I wanted to play around with a new theme. These may be 2 different questions.

    • WPBeginner Support

      You could certainly test those changes with a staging environment without having to worry about what people see on the site.

      Administrator

  31. Vanessa

    Thanks for the info. I currently use Bluehost but don’t have the staging site option I would love to test it out for a new theme I’d like to try before purchasing it. I contacted BH tech support the rep told me the feature is in development. Thanks again for the info.

    • WPBeginner Support

      Glad we could bring this feature to your attention even if it is currently being developed

      Administrator

      • Vanessa

        I was able to access the feature today. I’m excited to use it. Thanks again for the info. I’m excited to try out the staging feature.

  32. Ani Chijioke

    this is a great information, I have two websites, but I don’t feel like having both look the same.

    pls, I need help.

    is there any code I can add on >dashboard >customize >additional css,,, for the font color of my site to be pure black in color..

    I have this theme that I am using, it gives me everything I want. but the font color of my blog posts are light black. I will like to change the color to pure black

    any solution?
    thank you.

  33. alykhan

    Great article but the push back to live is a little brief. I have a WooCommerce site that needs a theme change. I used Duplicator Pro to make a copy on a staging server. I’ve made all the changes to the site including adding a couple of new plugins.

    Now I want to push the site back but I can’t do the same thing as there are new orders on the live site. How do I copy the site back without affecting the orders etc..?

    • WPBeginner Support

      Sadly, the safest method for that would be to prevent orders while updating from staging.

      Administrator

  34. Jennifer Verdin

    I haven’t read the comments yet, but I’ve been at this all day. The reason why is because this page does not tell you how to create a database user and assign privileges to the said user.

    Thankfully, I was able to figure it out, but that’s a KEY step that is missing to connect the site and database.

    • WPBeginner Support

      Apologies about the confusion, we will certainly look into clarifying that. If you reach out to your hosting provider they normally have a user already created.

      Administrator

  35. Max

    Hi guys,
    Thanks for your awesome post. I like the idea that the provider has the staging, productive and a test environment out of box.
    But I have two questions:
    1. Can write a little bit how it works by your suggested providers?
    2. Have you also providers which are located in the EU or better in Germany? And offer staging environment out of box?

    Kind regard

  36. Chris

    Thank you so much for this information! And if anyone’s wondering, yes, it’s still relevant 4.5 years later.

  37. Jess

    Hi there

    I am in the process of setting up a new WordPress site but I was planning to start building everything in my staging environment because I would like my live site to have a „under construction” landing page.

    What I am not sure of is how to push my changes from the staging site to my live site when I am ready. Would you mind describing this process please?

    Thank you
    Jess

    • Johnny

      If it’s simply a matter of wanting a „Under Construction” page while keeping the rest of the sight off limits to the public, there are plugins that will do that. Search „under construction.”

  38. Russell

    How does this process compare to using a plugin like wp-staging.

  39. Fernando Lisboa

    Hi, my question is, i created a staging environment, work there make some updates on structure of pages, layouts, new categories, new pluig-in.

    Ok, but in real live, my site is growing with new posts, comments, images, videos, etc…

    When i push stage back to life, i will lost thes new itens that were create in real live ??? I test this in sitegroud, and i loose ever with advanved „push to live”

    tks

  40. Ravindra

    Hi,
    Thank you very much. This article was very helpful.

  41. Chris

    Hi, thanks for such a useful article,

    I’m having a small issue when I give it a go,

    I have got as far down as

    „Once WordPress has connected to your staging database, it should detect that WordPress has been installed, and prompt you to login” and I am stuck – it autoredirected to the wp-login and gave me a blank page. Not a 404, just a clean white screen.

    On the main page the login has been renamed so I try to navigate to that instead and again just a clean white screen.

    Can anyone give me any pointers on where I’m going wrong?

  42. Smitha

    Hi,

    Thanks for this article!
    I followed all the steps but I think I have missed one

    I created a staging environment and checked site url in wp-options and updated wp-config file but the staging site is being redirected to the primary site.

    Do I need to change any other setting?

  43. Ruth

    Hi! Thanks for the useful article!
    Question, is it necessary to create a new database for your subdomain? Can’t you just use your root domain’s database?
    Same for the FTP account, is it necessary to create a new one? I can now access my subdomain easily through my main FTP.
    Thanks!
    Best,
    Ruth

  44. Courtney

    Hello!

    Perhaps this was already covered. Do I need a child theme on my sub-domain serving as my staging site? I am adding custom code and modifications to the new theme on my subdomain with the intention of switching all of this over to the live site when finally ready. Would this complicate things when switching from the staging site to replacing what is currently the live site?

    Thank You!

  45. Lee Perry

    Hi, this article is super helpful. I have encountered one problem though, when I go to visit my staging URL, I have the following message appear 'server DNS address could not be found’. I have also cleared my cache and browser history as someone wrote this might help, but it hasn’t worked. I’m wondering what I am doing wrong. Any help would be great.

    Lee

    • Georgia

      I’m having the same problem – did you manage to resolve this issue?
      Thanks, Georgia

  46. Adrien

    While I appreciate the detailed instructions (I don’t like installing plugins to accomplish such tasks), I don’t see any advice concerning keeping the staging and live sites in sync. WordPress sites are generally edited live with respect to content—posts, products, media, etc. Once you follow these directions, the two content sets will diverge as users add content to the live site while the developer’s staging version remains an old copy. I don’t see a good solution for this save a cron rsync job. Any tips?

  47. Jason

    After you create the staging subdomain and ftp account.

    Skip all the other copying and database junk.

    Install duplicator on your live site. Make a duplicate backup, which includes a zipped copy and an install. Php file.

    Upload both to your staging area. (Maybe go in and create a database and user for the staging site in cpanel while you wait for the two fingers to upload)

    Point your browser to staging.domain.com/install.php and follow the prompts.

    Then go back to the rest of this tutorial for locking it down.

  48. Gus Reyes

    Hi, I followed another tutorial before I found this one and I installed WordPress BEFORE copying files over and running the SQL queries. My staging site does not populate with live site’s data. Any help you can offer about what to do at this point would be appreciated…

  49. Martin

    The staging site does not look exactly like my primary site. The default banner is there instead of my uploaded media (even though that file has transfered) and rather than a nav bar with drop down menus, I have a list of all of my site’s webpages. Is this normal? If not, could you point me where to sort it out?

    Thanks for this article!

  50. BLZ

    I keep getting this error when I try to run SQL queries ” #2013 – Lost connection to MySQL server during query”

  51. Stefan

    Thank you for the great tutorial! I followed it thourgh and created a staging site. However, the staging site seems to be missing some settings from the original site (where I am working with a template), e.g. the font is different, the menu and logo is missing and some other settings are just off. Are there additional files I need to copy?
    Thanks a lot!

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