Czy widzisz błąd „Brak katalogu tymczasowego” na twojej witrynie WordPress?
Błąd ten jest poważny i uniemożliwia przesyłanie obrazków, aktualizację motywów i wtyczek oraz aktualizację rdzeni WordPressa.
W tym artykule pokażemy, jak łatwo poprawić błąd „Brak katalogu tymczasowego” w WordPress.
Co powoduje błąd „Brak katalogu tymczasowego” w WordPress?
Czy twoja witryna internetowa WordPress wyświetla błąd „Brak katalogu tymczasowego”? Ten powszechny błąd WordPress jest spowodowany nieprawidłowymi ustawieniami PHP w twoim środowisku hostingowym WordPress.
Istnieje określone ustawienie PHP, które definiuje katalog tymczasowy, którego aplikacje takie jak WordPress mogą używać do tymczasowego przechowywania danych. WordPress potrzebuje dostępu do tego katalogu tymczasowego, gdy przesyłasz obrazek, instalujesz lub aktualizujesz wtyczkę lub motyw albo aktualizujesz rdzeń WordPress.
Jeśli lokalizacja tego katalogu nie jest zdefiniowana w konfiguracji PHP twojego serwera, WordPress nie będzie w stanie wykonać żadnej z tych czynności i wyświetli błąd „Brak katalogu tymczasowego”.
Możesz skontaktować się ze swoim dostawcą hostingu i poprosić go o poprawkę. Jeśli nie jesteś zadowolony z otrzymywanej pomocy technicznej, rozważ zmianę firmy hostingowej na lepszą.
Mimo to możliwe jest również samodzielne poprawienie błędu za pomocą obejścia. Przyjrzyjmy się, jak łatwo poprawić błąd „Brak katalogu tymczasowego” w WordPress.
Jak poprawić błąd braku katalogu tymczasowego w WordPressie?
W tym poradniku będziesz musiał edytować plik konfiguracyjny wp-config.php WordPress. Jeśli nie robiłeś tego wcześniej, zapoznaj się z naszym przewodnikiem na temat edycji pliku wp-config.php w WordPress.
Najpierw musisz połączyć się z twoją witryną internetową za pomocą klienta FTP lub menedżera plików znajdującego się w kokpicie cPanel twojego konta hostingowego.
Następnie należy zlokalizować plik wp-config.php i edytować go.
Poniższy fragment kodu należy wkleić do pliku tuż przed linią z napisem „To wszystko, przestań edytować! Szczęśliwego publikowania.
define('WP_TEMP_DIR', dirname(__FILE__) . '/wp-content/temp/');
Zapisz wprowadzone zmiany i prześlij plik wp-config.php z powrotem na swoją witrynę internetową.
Następnie należy przejść do katalogu /wp-content/folder
i utworzyć w nim nowy katalog. Powinieneś nazwać ten nowy katalog temp
.
To wszystko. Możesz teraz przejść na swój obszar administracyjny WordPress i spróbować wgrać obrazek.
Jeśli nadal widzisz komunikat o błędzie „Brak folderu tymczasowego”, musisz sprawdzić uprawnienia do katalogu wp-content.
Korzystając z klienta FTP, przejdź do katalogu głównego twojej witryny WordPress. Następnie należy kliknąć prawym przyciskiem myszy katalog wp-content i wybrać opcję „Uprawnienia plików…”.
Spowoduje to wyświetlenie okna dialogowego uprawnień do pliku. Teraz musisz wpisz 755 w polu wartości liczbowej.
Następnie możesz kliknąć przycisk „OK”, aby kontynuować.
Teraz powinieneś być w stanie przesyłać obrazki i przeprowadzać aktualizacje na twojej witrynie WordPress.
Mamy nadzieję, że ten poradnik pomógł ci dowiedzieć się, jak poprawić błąd „Naprawiono katalog tymczasowy” w WordPress. Możesz również zapoznać się z naszym przewodnikiem na temat tego, jak przyspieszyć twoją witrynę WordPress lub z naszą ekspercką listą najlepszych wtyczek do mediów społecznościowych dla 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.
Syed Balkhi says
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!
Rojin says
I had the “Missing temporary folder” error today, with only one site, and the problem was an old theme. I temporarily switched theme to one of the default WordPress themes.
define(’WP_TEMP_DIR’, dirname(__FILE__) . '/wp-content/temp/’);
This code and even the steps did not worked for me. Do you have any other methods to solve the issue.
WPBeginner Support says
If none of these methods worked for you, we would recommend reaching out to your hosting provider and see if they possibly have a setting that is overriding what you’re trying to do.
Administrator
RT Helan says
I tried as you mention but still not working
WPBeginner Support says
If the methods from this guide do not solve the issue, we would recommend reaching out to your hosting provider for them to take a look at your folder permissions for you.
Administrator
Luan Roloff says
I had the same problem when uploading new media files, updating my theme solved this problem for me.
WPBeginner Support says
Glad that solved the issue for you and thanks for sharing what worked for you
Administrator
Brian Coogan says
I had the „Missing temporary folder” error today, with only one site, and the problem was an old theme. I temporarily switched theme to one of the default WordPress themes (‘twentytwentyone’) and the error disappeared, at least in my case. I could see a whole bunch of JS errors in the browser console log (F12 in Chrome).
I did check out the temporary folder stuff above, but it didn’t seem to be key for me. Worth noting that my theme was VERY old and VERY broken (ie: PHP 5.6 days!), but just mentioning this in case someone else like me has tried everything else!
I didn’t have time to check out what was happening in the code to produce this message, but just wanting to confirm that there’s at least one cause. In my case I’m the host and I’m sure the other sites on the server had no problem.
WPBeginner Support says
Thanks for sharing what caused this issue for you should someone else be looking for a reason
Administrator
Shahzad Ghafoor says
I have edit wp-config.php and created a temp folder but also there is error and not going to upload any file except after doing this I can just find and install themes and plugins but can’t upload from pc.
WPBeginner Support says
If the first method in this guide did not work for you, we would recommend following the steps in our troubleshooting section.
Administrator
Mel says
Thanks for this info. I had a site that had no issues previously with upgrading and then all of a sudden nothing would work – upgrades, uploads, etc. This fixed it. Thanks so much!
WPBeginner Support says
Glad our guide was helpful
Administrator
Paula Stewart says
Thank you so much for this, it really was easy to follow.
WPBeginner Support says
You’re welcome
Administrator
Jigisha says
Thank you. It worked perfectly.
WPBeginner Support says
You’re welcome
Administrator
Rabswudil says
Thank you so Much, God Bless you
WPBeginner Support says
Glad our guide was helpful
Administrator
Thami says
Hi all. Unfortunately I have tried to find the wp-config.php file in my cpanel, without any luck. It is just not there.
WPBeginner Support says
You may want to check with your hosting provider to ensure you are connected to the correct folder for your site
Administrator
Siloru says
Thank you!! You saved my nerves…
Mohsin says
Thanks’ it worked for me.
Rowan says
Also this error shows up when you have reached your disk quota. I get many clients emailing me about this, but they’ve just been uploading huge files and their web hosting is full. Clear some space and it’ll work again.
AR Badhon says
Thanks for Suggest..
but i’m tried , before i’ll can’t upload . finish set to set guide line.
pls Anyothers way
evans kyei says
Add From Server plugin saved my time. it’s easy to use, just upload your image through ftp and use Add from sever plugin to import to your Media Library.