Title: Missing a temporary folder error while uploading a media
Last modified: April 25, 2017

---

# Missing a temporary folder error while uploading a media

 *  [kamalchhirang](https://wordpress.org/support/users/kamalchhirang/)
 * (@kamalchhirang)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/missing-a-temporary-folder-error-while-uploading-a-media/)
 * I am getting this error after my friend changed the site server “Missing a temporary
   folder.”
 * Solutions I tried:
 * The first option is:
 * 1.Log into Hosting Cpanel of your server or use your FTP.
 * 2.Locate wp-config.php file in the root of your wordpress site.
 * Add following code after /* That’s all, stop editing! Happy blogging. */:
 * define(‘WP_TEMP_DIR’, dirname(__FILE__) . ‘/wp-content/temp/’);
    3.Save the file
 * Create a new folder temp in wp-content folder.
 * The second option is:
 * 1.Log into Hosting Cpanel of your server or use your FTP.
 * 2.Open public_html folder.
 * 3.Now create a file with a name php.ini.
 * 4.Place the following code inside the file:
 * upload_tmp_dir= /home/username/public_html/temp/
    5.Save the file.
 * 6.Create a temp folder at the same location, i.e. inside public_html.
 * Note: I read many blog articles, they said, ask your hosting provider. My friend
   gives me free hosting on his VPS server, and he changed the server. And he does
   not know, how to solve this problem.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Justin Greer](https://wordpress.org/support/users/justingreerbbi/)
 * (@justingreerbbi)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/missing-a-temporary-folder-error-while-uploading-a-media/#post-9065398)
 * I take it the article you read is not one from WordPress.org but rather a specific
   hosting site. Doing a quick search I think I ran into the same article. If you
   use that hosting platform, then it should work but most of the time the issue
   is with incorrect file and directory permissions.
 * Define the temp directory like you already did and then temporary change the 
   permissions for the tmp directory to 777. If everything starts to work, you know
   there is a permission issue.
 * DO NOT LEAVE IT LIKE THIS.
 * Visit [https://codex.wordpress.org/Hardening_WordPress](https://codex.wordpress.org/Hardening_WordPress)
   and have a look at the file permissions section. If this starts to cause issues,
   you should contact your host and have them fix the file permissions.
 *  [joybanerjee](https://wordpress.org/support/users/joybanerjee/)
 * (@joybanerjee)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/missing-a-temporary-folder-error-while-uploading-a-media/#post-9189416)
 * I have created a folder and also see uploads folder was missing i a have created
   that as well – but the error is same – can you suggest anything else?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Missing a temporary folder error while uploading a media’ is closed to
new replies.

## Tags

 * [missing a temporary folder](https://wordpress.org/support/topic-tag/missing-a-temporary-folder/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Justin Greer](https://wordpress.org/support/users/justingreerbbi/)
 * Last activity: [8 years, 12 months ago](https://wordpress.org/support/topic/missing-a-temporary-folder-error-while-uploading-a-media/#post-9065398)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
