Wielu właścicieli witryn internetowych nie zdaje sobie sprawy, że mogą uruchomić wiele instalacji WordPress w swojej domenie. Niezależnie od tego, czy chcesz przetestować nowe projekty, stworzyć witrynę przejściową, czy rozpocząć nowy projekt bez kupowania kolejnej domeny, instalacja podkatalogu może być niezwykle pomocna.
Takie podejście pozwoliło nam zaoszczędzić niezliczone godziny rozwiązywania problemów i zapobiec wielu potencjalnym katastrofom witryny internetowej. Z tego powodu uznaliśmy, że jest to jedna z najbardziej przydatnych sztuczek w naszym zestawie narzędzi.
Najlepsza część? Instalacja WordPressa w podkatalogu nie jest tak skomplikowana, jak mogłoby się wydawać. W tym przewodniku krok po kroku pokażemy, jak zainstalować WordPressa w podkatalogu, tak jak robiliśmy to niezliczoną ilość razy dla naszych własnych projektów.
Pod koniec tego poradnika będziesz miał jasne zrozumienie, jak utworzyć oddzielną instalację WordPress bez ingerencji w twoją główną witrynę.

Oto krótki przegląd tego, co omówimy w tym wpisie:
Subdomena a podkatalog: Która z nich jest lepsza dla SEO?
Zwykle, gdy uruchamiasz witrynę internetową WordPress, konfigurujesz ją pod własną dedykowaną nazwą domeny (np. wpBeginner.com). Czasami jednak możesz chcieć utworzyć dodatkowe witryny internetowe przy użyciu tej samej nazwy domeny.
Na szczęście WordPress daje kilka sposobów, aby to zrobić. Możesz zainstalować WordPress w subdomenie ((http://newebsite.example.com) lub jako podkatalog (http://example.com/newwebsite/).
Jedno z pytań, które otrzymujemy cały czas, brzmi: który z nich jest lepszy dla SEO? Rozłóżmy to na czynniki pierwsze.
Wyszukiwarki takie jak Google traktują subdomeny jako całkowicie odrębne witryny internetowe od twojej głównej domeny. Pomyśl o tym w ten sposób: widzą WPBeginner i naszą witrynę WPBeginner Videos jako dwa odrębne byty. Oznacza to, że subdomena musi niezależnie budować swój własny autorytet i moc rankingową.
Z drugiej strony, podkatalogi bezpośrednio korzystają z ustalonego autorytetu twojej głównej domeny. W większości przypadków daje to podkatalogom przewagę w rankingu w wynikach wyszukiwania.
Jeśli chcesz utworzyć oddzielne witryny WordPress przy użyciu subdomen lub podkatalogów, jedną z popularnych metod jest zainstalowanie sieci witryn WordPress. Pozwala to na zarządzanie wieloma witrynami z poziomu jednej instalacji WordPress.
Jeśli jednak chcesz, aby te witryny internetowe były całkowicie oddzielne i zarządzane niezależnie, możesz również zainstalować różne instancje WordPress. Aby ułatwić zarządzanie wieloma oddzielnymi instalacjami WordPress, możesz użyć narzędzi do zarządzania witryną WordPress, które zapewniają jeden kokpit dla wszystkich twoich witryn.
Wymagania dotyczące instalacji WordPressa w podkatalogu
Dobra wiadomość! Instalacja WordPressa w podkatalogu jest zazwyczaj dość prosta. Jeśli masz już witrynę internetową WordPress skonfigurowaną w Twojej głównej domenie (np. yourdomain.com
), wszystko jest gotowe. Nie musisz robić nic specjalnego po stronie hostingu.
Jeśli jednak twoja główna domena jest obecnie hostem statycznej witryny internetowej (takiej, która nie jest zbudowana za pomocą WordPressa), będziesz chciał szybko sprawdzić u swojego dostawcy hostingu, aby upewnić się, że obsługuje on WordPressa. Większość renomowanych hostów to robi, ale zawsze dobrze jest to potwierdzić.
Jeśli twój obecny hosting nie obsługuje WordPressa, nie martw się. Wystarczy, że przeniesiesz swoją witrynę internetową do innej firmy hostingowej.
Gorąco polecamy Bluehost. Oferują fantastyczną zniżkę na hosting specjalnie dla użytkowników WPBeginner, a nawet zawierają bezpłatną nazwę domeny.
Jeśli korzystasz z usług innego dostawcy hostingu, to wszystkie najlepsze firmy hostingowe WordPress bardzo ułatwiają instalację wielu witryn internetowych WordPress przy użyciu tego samego konta hostingowego.
Na przykład, jeśli korzystasz z Bluehost, możesz łatwo utworzyć nową instalację WordPress bezpośrednio z kokpitu twojego hostingu.

Należy jednak pamiętać, że większość współdzielonych kont hostingowych ma ograniczone zasoby serwera. Jeśli jedna z twoich witryn nagle uzyska duży ruch, może to potencjalnie spowolnić lub mieć wpływ na wydajność innych witryn na tym samym koncie.
Jeśli dopiero zaczynasz, korzystanie z hostingu współdzielonego jest często całkowicie w porządku. Jednak w miarę rozwoju twojej firmy i ruchu na witrynie internetowej, prawdopodobnie będziesz chciał rozważyć przejście na zarządzany hosting WordPress, aby uzyskać lepszą wydajność i skalowalność.
Biorąc to pod uwagę, przyjrzyjmy się, jak łatwo zainstalować WordPressa w podkatalogu.
Krok 1: Utwórz podkatalog pod główną nazwą domeny
Po pierwsze, musisz utworzyć nowy podkatalog (pomyśl o tym jak o katalogu) pod twoją główną witryną internetową. To tutaj zainstalujesz wszystkie pliki WordPress dla twojej nowej witryny
Aby to zrobić, musisz połączyć się ze swoim kontem hostingowym WordPress za pomocą klienta FTP, takiego jak FileZilla, lub narzędzia Menedżer plików, które jest zwykle dostępne w twoim panelu sterowania hostingu (np. cPanel).
Po nawiązaniu połączenia przejdź do katalogu głównego twojej witryny internetowej, którym zazwyczaj jest katalog /public_html/.
Jeśli masz już witrynę internetową WordPress zainstalowaną w twojej głównej domenie, zobaczysz tutaj istniejące pliki i katalogi WordPress.
Następnie należy utworzyć nowy podkatalog. Kliknij prawym przyciskiem myszy w folderze głównym i poszukaj opcji takich jak “Utwórz nowy katalog” lub “Nowy katalog”.

Zachowaj ostrożność przy wyborze nazwy dla twojego podkatalogu. Nazwa ta stanie się częścią adresu URL twojej nowej witryny WordPress i to właśnie ten jej rodzaj ludzie będą wpisywać w swoich przeglądarkach, aby przejść na tę konkretną witrynę internetową.
Na przykład, jeśli nazwiesz ten katalog travel-guides, to adres twojej witryny internetowej WordPress będzie następujący: http://example.com/travel-guides/.

Krok 2: Prześlij pliki WordPress
Twój nowo utworzony podkatalog jest w tej chwili pusty. Zmieńmy to, wgrywając pliki WordPress.
Najpierw należy przejść na witrynę internetową WordPress. org i kliknąć przycisk “Pobierz”.

Twoja przeglądarka pobierze teraz plik zip zawierający najnowsze oprogramowanie WordPress na twój komputer.
Po pobraniu pliku należy go wybrać i rozpakować:
- Użytkownicy komputerów Mac: Wystarczy dwukrotnie kliknąć pobrany plik zip.
- Użytkownicy systemu Windows: Kliknij plik zip prawym przyciskiem myszy i wybierz opcję “Wyodrębnij wszystko”.

Po rozpakowaniu pliku zip zobaczysz katalog “wordpress”.
Wewnątrz katalogu wordpress znajdują się wszystkie rdzenne pliki i katalogi WordPress.

Teraz prześlijmy te pliki do twojego nowego podkatalogu.
Połącz się z twoją witryną internetową za pomocą klienta FTP i przejdź do podkatalogu utworzonego w pierwszym kroku. W panelu plików regionalnych twojego klienta FTP, przejdź do katalogu “wordpress”, który właśnie wyodrębniłeś.
Teraz wybierz wszystkie pliki w twoim katalogu i prześlij je do nowego podkatalogu.

Krok 3: Utworzenie nowej bazy danych
WordPress przechowuje całą twoją treść w bazie danych. Ponieważ instalujesz nową witrynę WordPress w podkatalogu, musisz utworzyć dla niej zupełnie nową bazę danych.
Najpierw zaloguj się do kokpitu swojego konta hostingowego WordPress i kliknij przycisk “Ustawienia” znajdujący się pod twoją witryną internetową.

Następnie przejdź do karty “Zaawansowane” w górnym menu.
Przewiń nieco w dół do sekcji cPanel, a następnie kliknij “Zarządzaj”.

Spowoduje to uruchomienie cPanel lub zaawansowanego panelu sterowania hostingu.
Następnie należy kliknąć “Bazy danych MySQL” w sekcji “Bazy danych”.

👆 Twój kokpit hostingowy może wyglądać nieco inaczej niż na powyższych zrzutach ekranu, ale rdzeń koncepcji jest taki sam. Musisz tylko znaleźć obszar, w którym możesz zarządzać bazami danych.
Na następnym ekranie wpisz nazwę twojej nowej bazy danych i kliknij przycisk “Utwórz bazę danych”.

Twój kokpit cPanel utworzy teraz nową bazę danych MySQL. Po zakończeniu kliknij przycisk “Wróć”, aby powrócić do strony Bazy danych.
Następnie należy utworzyć użytkownika MySQL, który będzie miał uprawnienia dostępu i zarządzania nową bazą danych.
Wystarczy przewinąć w dół do sekcji “Użytkownicy MySQL”. Tutaj będziesz mógł utworzyć nową nazwę użytkownika i silne hasło dla tego użytkownika.
Następnie kliknij przycisk “Utwórz użytkownika”, aby kontynuować.

Na koniec należy połączyć tego użytkownika z utworzoną wcześniej bazą danych i nadać mu niezbędne uprawnienia.
Przewiń w dół do sekcji “Dodaj użytkownika do bazy danych”. Wybierz nazwę użytkownika MySQL, którą właśnie utworzyłeś z rozwijanego menu, a następnie wybierz nazwę utworzonej bazy danych.

Kliknij przycisk “Dodaj”, aby kontynuować.
cPanel przyzna teraz użytkownikowi MySQL pełne uprawnienia do twojej nowo utworzonej bazy danych.
Krok 4: Instalacja WordPress
Teraz, gdy wszystko jest już gotowe, możesz przejść do instalacji WordPressa.
Przejdź na utworzony wcześniej katalog w przeglądarce internetowej, wpisując adres URL w następujący sposób:
http://example.com/your-subdirectory-name/
Spowoduje to wyświetlenie kreatora instalacji WordPress. Najpierw wybierz język dla twojej witryny internetowej WordPress i kliknij przycisk “Kontynuuj”.

Następnie zostaniesz poproszony o podanie nazwy bazy danych WordPress, nazwy użytkownika bazy danych, hasła i hosta.
Wpisz dane bazy danych i kliknij przycisk “Prześlij”.

WordPress połączy się teraz z twoją bazą danych.
Po nawiązaniu połączenia zostanie wyświetlony następujący komunikat o powodzeniu:

Kliknij przycisk “Uruchom instalację”, aby kontynuować.
Na następnym ekranie zostaniesz poproszony o podanie tytułu twojej witryny internetowej i wybranie nazwy użytkownika administratora, hasła i adresu e-mail.

Po wpiszeniu danych twojej witryny internetowej, kliknij przycisk “Uruchom instalację”, aby kontynuować.
WordPress skonfiguruje teraz twoją witrynę internetową i po zakończeniu wyświetli komunikat o powodzeniu:

Teraz możesz logować się do twojej nowej witryny internetowej WordPress, która jest zainstalowana w podkatalogu.
Krok 5: Poprawka bezpośrednich odnośników
Jeśli masz już oddzielną instalację WordPress w katalogu głównym, możesz napotkać problem, w którym plik .htaccess w twoim podkatalogu powoduje konflikt. Może to prowadzić do frustrujących błędów 404 na twojej nowej witrynie internetowej w podkatalogu.
Nie martw się, jest na to prosta poprawka. Wystarczy edytować plik .htaccess w twoim podkatalogu WordPress install. Zastąp kod wewnątrz twojego pliku .htaccess następującym kodem:
1 2 3 4 5 6 7 8 9 10 11 | # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /your-subdirectory/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /your-subdirectory/index.php [L] </IfModule> # END WordPress |
Upewnij się, że zastąpiłeś /your-subdirectory/ rzeczywistą nazwą twojego podkatalogu.
Jak właśnie zauważyłeś, prowadzenie witryny WordPress może czasami brać udział w kilku technicznych przeszkodach. Jeśli myśl o radzeniu sobie z potencjalnymi błędami lub aktualizacjami brzmi stresująco, jesteśmy tutaj, aby pomóc.
Nasze usługi serwisowe WordPress eliminują kłopoty związane z zarządzaniem witryną internetową, dzięki czemu możesz skupić się na tym, co naprawdę ważne: dodawaniu treści do twojej nowej witryny i zwiększaniu liczby odbiorców!
Mamy nadzieję, że ten artykuł pomógł ci zainstalować WordPressa w podkatalogu. Następnie warto zapoznać się z naszym przewodnikiem na temat tworzenia jednostronicowych witryn internetowych lub zobaczyć nasz ekspercki wybór najlepszych kreatorów stron typu “przeciągnij i upuść“.
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.
Chanakya Sahu
Hi, I have created subdirectory using auto-installer feature in Hostinger for my News blog for creating a completely different site for different language. For example:- example.com/language. I am gonna post unique articles here.
I might also post the translated version here (Not ai translated though, I am gonna translate it myself). Does it affect SEO? Should I translate the some articles or leave it to google?
WPBeginner Support
You would want to check with your SEO plugin to ensure the correct markup is added and it should not affect your SEO.
Admin
Prem Krishnan P
I have installed WordPress on the subdirectory. (i.e)www.example.com/blog) and now I created a test post (i.e.)www.example.com/blog/test. Is it possible to remove the subdirectory from the url? Looking something like this example.com/test (i.e)www. Rootsitename.com/Postname
WPBeginner Support
If you want to do that then we do not have a specific recommendation to achieve that and it would likely be best to place the post on your primary domain to achieve that.
Admin
Jiří Vaněk
This can be done using the .htaccess file, which is the Linux apache configuration file. It is possible to upload rules to this file, which can be used to rewrite URL addresses in the browser. However, it is a relatively complex topic and it is necessary to approach such an intervention sensitively.
Yevhenii Korchak
Thanks for the tutorial! Very helpful. You’re the best
WPBeginner Support
Thank you and glad to hear our tutorial was helpful!
Admin
Mangkutak
is this type of wordpress installation still can enable multisite feature if i want it to enable for my wordpress site. i heard that before long time ago that’s not possible, is that still the case today?
WPBeginner Support
You can convert a site to a multisite installation.
Admin
Mohammed
hello,
I did the same steps, once I installed WordPress and do some tests I found that cannot make save posts or publish them. an error message appears
Updating failed. The response is not a valid JSON response.
please help.
WPBeginner Support
For the invalid JSON error, we would recommend going through our article below!
https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-invalid-json-error-in-wordpress-beginners-guide/
Admin
alan
Thanks for this tutorial. I wasn’t sure if I had to previously create the database or make it during the install process.
WPBeginner Support
Glad our guide was helpful!
Admin
Giwa
Hello, this steps are self explanatory but in my case, our main website doesn’t run on WordPress however we want to run WordPress on a sub-directory /blog.
How do we go about this
the main website runs on NodeJs
WPBeginner Support
You should still be able to follow the steps in this guide for what you’re wanting to do.
Admin
Abid Hasan
Today I’ve set up my new WordPress inside sub-directory. Didn’t need to change the .htaccess file. I think WP is so smart now that can handle this automatically.
WPBeginner Support
Thanks for sharing, your hosting provider may have also set it up for you when installing as certain hosts set that up for you now.
Admin
Goran
Thanks a lot for great tutorial whithout any issues.
WPBeginner Support
Glad our guide was helpful
Admin
Sam
Thank you for this guide.
We are planning to have subdirectories on our next website. This guide really cleared the air.
One question though,
Is there a limited to how many subdirectories a WordPress website can have?
WPBeginner Support
There is not a hard limit to the number of directories at the moment.
Admin
Swetha
Hi.. thanks for this article… am unable to upload the folders wp-admin, wp-content and wp-includes in the sub directory… rest other files are uploaded.. how do I upload all of these???
WPBeginner Support
It would depend on why you are unable, if you reach out to your hosting provider they should be able to assist but it may be a permissions issue with your user.
Admin
Arinze
Thanks it worked.
Is it possible to the subdirectory name on the URL, for example example.com/seo/how-to-rank to example.com/how-to-rank
WPBeginner Support
If you would like your URLs not to have the subdirectory in the URL we would recommend installing the site on your primary domain rather than creating redirects to remove it from the URL.
Admin
Arinze
Thanks for this article. It is very insightful.
Will the installation of WordPress on the sub folder affect the overall speed of the site.
WPBeginner Support
It should not
Admin
dennis wille
there is an apparent error in your htaccess code example
should be
# BEGIN WordPress
RewriteEngine On
RewriteBase /your-subdirectory/
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /your-subdirectory/index.php [L]
# END WordPress
note rewriterule line 5 change
WPBeginner Support
Thank you for catching that, while not specifically required, we’ll look to update the article
Admin
Deddy Hidayat
I want to build a web with a wordpress subdirectory, the first web is domain.com, and the second web is domain.com/blog … as far as I know wordpress uses domain.com/blog as the default post … will it hurt SEO?
WPBeginner Support
WordPress does not use /blog as a default, that is only the most common URL to use. Using blog for a subdirectory should not have a major effect on SEO.
Admin
Shashank Dubbewar
is it necessary to install and manage same plugins separately if I installed wordpress on main domain and sub directory each and manage wordpress sites separately ?
WPBeginner Support
If it is on a different site even on a subdirectory, the plugins are managed for each individual site. You could also take a look at some recommended tools for managing multiple sites in our article below:
https://www.wpbeginner.com/showcase/how-to-easily-manage-multiple-wordpress-sites/
Admin
Mohd Kaleem
Hello Sir, Can I create Subdirectory without login Cpanel. I forgot My Hosting Details. But I have WP details, is it possible to create subdirectory using wordpress any plugin or other way?
WPBeginner Support
You would need access to your hosting, you should be able to reach out to your hosting provider for assistance in being able to log back into your account.
Admin
Kosi
Thank you. This worked! Really grateful….
WPBeginner Support
You’re welcome, glad our guide was helpful
Admin
Nicoleiver
Hi, I would like to ask is it possible to copy all the file from my current folder to the sub directory? Because I want to have the same template and plugin for my sub directory site.
WPBeginner Support
For a starting point, you could take a look at our guide on how to make a staging site below and instead of installing the site on staging you could have all of your content on the subdomain of your choice and modify the content to be that of your new site. You can find our guide on setting up a staging site below:
https://www.wpbeginner.com/wp-tutorials/how-to-create-staging-environment-for-a-wordpress-site
Admin
John Doe
What if the I created a new subdirectory from another subdirectory, should the fix permalink still be relevant and work with no problem?
For example, I have firstwebsite.com/firstsubdir/ the second subdirectory will be firstwebsite.com/firstsubdir/secsubdir/ should I still use the same fix for the permalink?
Sorry English is not my first language.
WPBeginner Support
You would need to include the second subdirectory in the permalink change and it should still work.
Admin
keram
Thanks for a clear tutorial.
Is it possible to install WP in a subdirectory but use the main domain URL to access it and still have the main URL displayed in the browser address bar?
To clarify:
I would install WP in mydomain.com/sub/ but would like to access it by opening mydomain.com and have mydomain.com displayed in the browser so that visitors can bookmark my URL.
Is it possible to set it up?
WPBeginner Support
It is possible but would depend on your hosting provider to see if it is allowed. If you reach out to your hosting provider they should be able to assist.
Admin
keram
Will the pages load faster if WP is installed in the subdirectory?
WPBeginner Support
Where your site is installed on your host shouldn’t affect your site’s loading time to a noticeable degree
Ghulam Mujtaba
Salam, I just finished reading the article and i have question, how can i have the same header and footer from the wordpress installation in parent directory? I’ll be glad and thankful to you if you give me a clue, Thanks…
WPBeginner Support
For that, the simplest method would be to install the same theme on both sites.
Admin
Priscilla
Hello,
Thans for this awsome tuto, it works!
WPBeginner Support
Glad our guide was helpful
Admin
Sohail
Really helpful! One question please.
Do I have to add this line:
RewriteBase /your-subdirectory/
for every install in a sub directory in main WordPress installation?
Thanks
WPBeginner Support
Yes, we would recommend this to prevent any issues on the subdirectory
Admin
Samantha
Thank you for this information! Helped me a lot!
WPBeginner Support
You’re welcome, glad our guide could help
Admin
Alex
Hi. I manually copied my WordPress files to the root folder, without the plugin. I then copied the original database in a new one, where I replaced the siteurl to reflect the new location, the root folder. In the wp-config file at the root folder, I changed WP_HOME and WP_SITEURL to remove the /wordpress.
As a result, I was able to reach the wp-login for my new location, but no further.
And when I visited my site, I was getting a warning “too many redirections”.
Any advice?
WPBeginner Support
There are a few possible reasons, for a starting point, you would want to go through the steps in our article here: https://www.wpbeginner.com/wp-tutorials/how-to-fix-error-too-many-redirects-issue-in-wordpress/
Admin
Abhishek mahajan
Thanks a lot for WP subfolders step by step guide. One thing that i never undersatnd is how to create a exact Google news xml sitemap in WordPress?
WPBeginner Support
Most SEO plugins should add the required markup for you to be able to be added to Google News. If you are using an SEO plugin you would want to reach out to the plugin’s support for what they recommend for setttings.
Admin
Hesam
Thanks for your article. I have a question about transforming this sub domain or sub directory installed word press to main root of website and replace it with the main site. what should I do?
WPBeginner Support
It would depend on what you mean, you could take a look at our guide here: https://www.wpbeginner.com/wp-tutorials/how-to-get-rid-of-wordpress-from-your-wordpress-site-url/
Admin
Umesh Yellaboina
Hi Team, Thanks for this post, not only these… all the other posts in your blog are very helpful to us, I really appreciate your works. Thanks a lot for these.
And need a little help, actually did the same as in this post, installed wordpress in a sub directory, but I’m face a little issue, i.e. I’m unable to receive the emails from contact form, when it was on sub-domain it’s working fine, but when it is installed on sub-directory not receiving the form submissions, it’s going on loading but not getting submitted. Please help me with this. Thank you.
WPBeginner Support
If they’re not being stored in your site if they should when submitted you would want to reach out to your form plugin’s support. If you are not receiving an email then you would likely want to use SMTP: https://www.wpbeginner.com/plugins/how-to-send-email-in-wordpress-using-the-gmail-smtp-server/
Admin
David
Thanks for the info. I read every post you write.
Just I’ve a doubt. I created a new WP Install trough my Host provider, but searching, there is no .htaccess file in the subdirectory. It’s mandatory to have a new .htaccess file? it’s going to create errors in the future?
WPBeginner Support
WordPress should generate the htaccess file if you resave your permalinks. If you still don’t see it you may not have the option to show hidden files enabled
Admin
Rubens
thankkkkkkkssssssss <3
WPBeginner Support
You’re welcome
Admin
Eulises Quintero
Hello, I successfully installed WordPress in a subdirectory around 3 weeks ago, I already uploaded a theme, some plugins and made some posts. Question, can I change the name of my subdirectory? How? the name is Chose for my subdirectory and what shows after my original website URL is español, I want to make it es, I want to change this because I read somewhere that characters like ñ might cause some issues in terms of SEO….so now I’m worried, thank you for your time
WPBeginner Support
If the site has been set up for some time, you would want to follow the steps in our article here: https://www.wpbeginner.com/wp-tutorials/how-to-properly-move-wordpress-to-a-new-domain-without-losing-seo/
If you recently installed it on the subdomain then you wouldn’t need to notify Google
Admin
Mosiur Rahman
Hey, I just followed the process except i haven’t changed the htaccess file. My site is still working properly. I am using hostinger.
is changing the htaccess mandatory ? will it cause error in the future?
WPBeginner Support
Your host may have set up the redirect for you, if you reach out to your host they should be able to let you know.
Admin
Owaiz Yusufi
Just got it to work but little bit worried, does it increases my load time of both pages. I mean to say that
( currently I have made this on localhost for test but I am going to implement it in one or two days on my main server )
I have two website but single domain
Just want to know that does this will increase the bandwidth useage and load time.
Let’s suppose if I my main webpage size 1 mb and my second website size is also 1 mb so when someone load the main page does it loads all the 1+1 2mb size.
WPBeginner Support
Hi Owaiz,
Yes it will increase bandwidth usage depending on your traffic. Since both WordPress installs share the resources, traffic load on one website will affect the performance of other website as well.
Admin
billybob
Wow, worked first time! Thank you so much!!
maxime
Thank you very much, clear and working
Mauwiks
My site got a white screen of death after this.
Shankar
Really Its very useful for beginners to install
Karen
Hello, I dont understand something. What is the difference between installing wordpress in a subdirectory and just creating multiple pages???
I am a noob
Simson
I think I did everything as shown in your instructions. But the trouble I’m having is when I’m trying to customize my theme on the subdirectory it taking me to the root domain wp customizer. What should I do then… ?
Yoki andika
Hello, can you help me?
I installed my local wordpress to the subdir with ftp but the problem is the css doesn’t work properly, and i don’t know what’s wrong with my wordpress, because i follow this step.
Maybe Anyone can help?
Thank you
Kandra
Hi,
I am following the steps that you have recommended in creating the sub directory, but than I see the following error,
When I trying to open the URL after uploading all the files to the folder through FTP,
I see the URL redirecting to wp-admin/setup-config.php & throwing an server error 500 (This page isn’t working
simplyrent.in is currently unable to handle this request.
HTTP ERROR 500)
Jyotishman Nath
I have heard that subdirectories are treated as part of root domain in terms of ranking.But my subdirectory is not ranking, even for exact match keyword search.I have indexed Subdirectory using Fetch as Google Tool.I don’t know what is the problem?
I have submitted it to Search Console, Created separate robot.txt and sitemap (Sitemap is pending from last two days).
Should I give more time to Google to Crawl by Subdirectory?
Please Replay.
Thanks!
WPBeginner Support
Hi Jyotishman,
It is up to search engines to decide how they would rank your website in their results. All you can do is optimize your website for SEO and follow the best practices.
Admin
Layon
Thank you for this tutorial. It saved me after hours trying to understand why I was getting 404 errors all day long.
Johnny
just put this in your .htaccess
DirectoryIndex index.php
thank me later!
TH
Question: Login for main and subdirectory
Hi. I created a subdirectory with a separate WP install.
It looks like the user has to create an account for the main and subdirectory and to login for both the main and subdirectory.
Is there a way to let a user who has login to either the main or subdirectory site to have access to the other site without having to login again? i.e if user has login into main site, he/she does not need to login to the subdirectory site. and vice versa.
Thanks.
TH
Dragos
By default, if you are using softaculous, you are installing wordpress to the default directory named wp. You don’t need to install manually WordPress in a directory/ subdomain, you only need to change the name of the directory where you want Softaculous to install WordPress and it will also make a database and so on.
medmouncef
Thanks for this tutorial.
It would be interesting to show, when you have a little time of course, how to configure cPanel redirects to this subdirectory. For example, I can’t redirect my domain name to a WordPress subdirectory créé sous /public-html.