Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Så här fixar du error ”Saknar temporär folder” i WordPress

Det kritiska felet ”Saknar en tillfällig mapp” i WordPress är allvarligt.

Vi har upptäckt att det kan hindra dig från att ladda upp bilder, uppdatera teman och plugins och till och med uppdatera WordPress-kärnan, vilket allvarligt hindrar funktionaliteten på din webbplats.

I den här artikeln kommer vi att gå igenom stegen för att enkelt åtgärda felet ”Saknar en tillfällig mapp” i WordPress så att din webbplats fungerar smidigt och effektivt.

How to Fix "Missing a Temporary Folder" Error in WordPress

Vad orsakar error ”Saknar en temporär folder” i WordPress?

Visar din WordPress website error ”Saknar en temporär folder”? Detta vanliga WordPress error orsakas av felaktiga PHP settings i din WordPress webbhotell miljö.

Det finns en specifik PHP-inställning som definierar en tillfällig folder som appar som WordPress kan använda för att tillfälligt lagra data. WordPress behöver tillgång till den här temporära mappen när du uploadar en image, installerar eller uppdaterar ett plugin eller theme, eller update WordPress core.

Om placeringen av denna folder inte är konfigurerad i din servers PHP-konfiguration, kommer WordPress inte att kunna göra något av detta och kommer att visa dig ”Missing a temporary folder” error.

The 'Missing a Temporary Folder' Error Message

Du kanske vill kontakta din hosting provider och be dem fixa detta åt dig. Om du ej är nöjd med det tekniska support du får, överväg då att byta till ett bättre webbhotell för WordPress.

Med detta sagt är det också möjligt att fixa error själv med hjälp av en workaround. Låt oss ta en titt på hur du enkelt fixar error:et ”Saknar en temporär folder” i WordPress.

Så här fixar du error ”Saknar temporär folder” i WordPress

För denna tutorial måste du editera wp-config.php WordPress konfigurationsfil. Om du inte har gjort det tidigare kan du läsa vår guide om hur du redigerar filen wp-config.php i WordPress.

Först måste du ansluta till din website med hjälp av en FTP-klient eller filhanteraren som finns i cPanel-instrumentpanelen på ditt webbhotell account.

Därefter måste du lokalisera filen wp-config.php och editera den.

You Need to Edit wp-config.php

Du måste klistra in följande code snippet i filen precis före raden som säger, ”That’s all, stop editing! Trevlig publicering.

define('WP_TEMP_DIR', dirname(__FILE__) . '/wp-content/temp/');
Paste the Code Snippet Into wp-config.php

Save dina ändringar och upload filen wp-config.php tillbaka till din website.

Därefter måste du gå till mappen /wp-content/och skapa en new folder i den. Du bör namnge den här nya mappen temp.

Create a Temp Directory in the WP-Content Folder

Det var allt. You can now visit your WordPress admin area and try uploading an image.

Om du fortfarande ser error-meddelandet ”Missing temporary folder” måste du kontrollera behörigheterna för mappen wp-content i din folder.

Använd din FTP-klient och gå till rotmappen på din site i WordPress. Därefter ska du högerklicka på wp-content foldern och välja ”File permissions…

Check the File Permissions of the WP-Content Folder

Detta kommer att visa dialogboxen för filbehörigheter. Nu måste du enter 755 i det numeriska värdefältet.

Sedan kan du klicka på knappen ”OK” för att fortsätta.

Make Sure the File Permissions Are 755

Nu ska du kunna uploada images och utföra updates på din WordPress site.

Vi hoppas att denna handledning hjälpte dig att lära dig hur du åtgärdar felet ”Saknar en tillfällig mapp” i WordPress. Du kanske också vill se vår guide om hur du ställer in WordPress-felloggar eller vårt experturval av de vanligaste WordPress-felen och hur du åtgärdar dem.

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.

Avslöjande: Vårt innehåll stöds av våra läsare. Det innebär att om du klickar på några av våra länkar, kan vi tjäna en provision. Se hur WPBeginner finansieras, varför det är viktigt, och hur du kan stödja oss. Här är vår editoriala process.

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.

Den ultimata WordPress-verktygslådan

Få GRATIS tillgång till vår verktygslåda - en samling WordPress-relaterade produkter och resurser som varje professionell användare bör ha!

Reader Interactions

26 kommentarerLämna ett svar

  1. 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!

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

      Administratör

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

      Administratör

  3. 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 :)

      Administratör

  4. 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 :)

      Administratör

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

      Administratör

  6. 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!

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

      Administratör

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

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

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

Lämna ett svar

Tack för att du väljer att lämna en kommentar. Tänk på att alla kommentarer modereras enligt våra policy för kommentarer, och din e-postadress kommer INTE att publiceras. Vänligen använd INTE nyckelord i namnfältet. Låt oss ha en personlig och meningsfull konversation.