I uploaded my first wordpress website on the server, but trying to add new media files, i have got the message "Missing a temporary folder", I tried the solutions on the forum:
define('WP_TEMP_DIR',dirname(__FILE__).'/wp-content/temp/');
and created a 'temp' folder on 'wp-content', but the problem still happened .. how to fix that please ??
I tried by doing this : creating the folder on localhost with writable property then upload it to the server, but it still doesn't work
I uploaded my first wordpress website on the server, but trying to add new media files, i have got the message "Missing a temporary folder", I tried the solutions on the forum:
define('WP_TEMP_DIR',dirname(__FILE__).'/wp-content/temp/');
and created a 'temp' folder on 'wp-content', but the problem still happened .. how to fix that please ??
I tried by doing this : creating the folder on localhost with writable property then upload it to the server, but it still doesn't work
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:
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
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.
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.
If the issue is not fixed yet, or the folder already exists then we have to check the permissions of the folder.