While I would never recommend running WordPress on a Windows box unless you have to (having done this for several years and the performance was just never on par with a Linux equivalent), if you must then you may encounter permission issues kicking up errors like these:
- Destination directory for file streaming does not exist or is not writable.
- Missing a temporary folder
Use Recommend IIS Permissions
Historically IIS sites used the IUSR account for anonymous authentication and so permissions we’re granted to this. Best practice now however is to run each site under its Application Pool Identify.
- Ensure your site has its own Application Pool
- Right Click the Application Pool and go to Advanced Settings > Processing Model > Application Pool Identity
- On your site, double click > Authentication > Anonymous Authentication > Application Pool Identity (not IUSR)
- Next in explorer, browse to the sites folders and grant read/write/modify permissions using IIS AppPool\MyAppPoolName
WordPress Temporary Folder
After the lines that define ( ABSPATH: define(‘ABSPATH’, dirname(__FILE__) . ‘/’)) and then pull in the settings (require_once(ABSPATH . ‘wp-settings.php’);), paste the following if you want to specify your own temporary folder. For example the following line tells WordPress to use a folder within wp-content:
Next in explorer, browse to the temporary folder and ensure you have granteded read/write/modify permissions using IIS AppPool\MyAppPoolName
Windows Temporary Folder
Now you may still receive an error when uploading even after the above has been done. This can be because PHP uses its own temporary folder while the file is being streamed to the server before moving it to the WordPress temporary folder to work on it.
Whatever the folder is (see below), you need to ensure that the same Application Pool group has read/write/modify access to it, for example: IIS AppPool\MyAppPoolName
If you want to specify the folder PHP uses, you need to update this line in the php.ini file (typically found in C:\Windows\Program FIles\PHP or C:\Windows\Program Files (x86)\PHP):
; Temporary directory for HTTP uploaded files (will use system default if not ; specified). ; http://php.net/upload-tmp-dir upload_tmp_dir = C:\Windows\Temp