• Hi,

    I get the “Missing temporary folder” error whenever I try to upload an image to Media Library. But I can directly upload and insert any image to my posts, and those images then appear in Media Library. I can also scan uploads folder by using a plugin to then add any image to Media Library.

    So, I can indirectly upload images to Media Library by inserting them to my posts or using a scanning plugin, but I cannot directly upload them to Media Library.

    1. I tried to add these lines to wp-config before “That’s all, stop editing.” I also created various temp files named temp, TEMP, tmp. It didn’t work.

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

    2. I tried to change the permissions for wp-content, wp-admin, etc. I tried all possible combinations, and even 777 doesn’t work. I tried to change the permissions for wp-config too, but it just messed up with the site and didn’t work either.

    3. The technical support guys in my hosting company were no help. They tried to update the PHP, troubleshoot the WordPress client, did a malware scan, deactivated and activated the plugins, and checked the potential theme issues. Nothing worked. They said they don’t know what the problem is.

    What else do you think I can try?

    Thank you.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi afbsandbox,

    Since you already tried adding the method to add:

    define('WP_TEMP_DIR', dirname(__FILE__) . '/wp-content/temp/'); and still not works.

    Try the other method by adding a code snippet in php.ini file.

    1. Login to your server, either CPanel or FTP.
    2. Go to your WordPress root directory, usually public_html
    3. Find php.ini file. If you don’t have one yet, create a file called php.ini.
    4. Insert the following code snippet into the file: upload_tmp_dir= /home/username/public_html/temp/ (could be different from your server)
    5. Save the changes.
    6. Lastly, like in the first method you’ve tried, create a temp folder in public_html after defining the temp folder.

    Try to test if this will work for you.

    I hope this helps.

    Thread Starter afbsandbox

    (@afbsandbox)

    Thanks for your message, jhimross.

    Unfortunately, this doesn’t work either.

    I am also having the same issue. I’ve done everything:

    • Edited the php.ini file
    • Edited the .htaccess file
    • Added the WP_TEMP_DIR code to the wp-config.php file
    • Made sure upload_tmp_dir= was set to On
    • Created the folder in the root directory and in the wp-content directory
    • Cloned all of the settings from a previous installation that had the same problem, yet works now

    Why is it being dumb after a PHP7.4 update?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Missing Temporary Folder: Tried everything, nothing works.’ is closed to new replies.