1
votes

Please help me what should I do I do not understand what should I do when I try to upload an image on my WordPress site am getting an error and it shows me a message "Missing a temporary folder" screensort

3
Please follow stackoverflow.com/help/how-to-ask. Post the error or code as text instead of screenshotSangam Belose
which theme you are using?Vel

3 Answers

0
votes

Use this code in your wp-config.php

define('WP_TEMP_DIR', dirname(__FILE__) . '/wp-content/temp/');

Add temp folder in wp-content. I hope its work for you

0
votes

if check file and folders permissions and try all ways but can't fix problem. You can connect your Hosting company for fix this problem

0
votes

I have accidentally deleted the tmp folder from my computer (Macbook) and faced the issue on the localhost WordPress site, and followed the below steps to fix the issue:

  1. First, have to check the temporary folder location by the below code.

    var_dump(sys_get_temp_dir()); In my case, the output was /var/tmp

  2. Then, we have to check if the folder exists or not, by the below code. var_dump(file_exists(sys_get_temp_dir())); In my case, the folder did not exist as I already deleted that.

  3. If the folder does not exist, then create a new folder named tmp. Open the terminal and navigate to the folder /private/var and create a new folder named tmp.

  4. If the issue is not fixed yet, or the folder already exists then we have to check the permissions of the folder.