I'm running WordPress on Windows 2008 / IIS 7 and I get a non-descript error when I try to upload a theme. It just says "Are you sure you want to do this?" and then a line below that says "Server error"
Here are a number of steps I had to take to resolve the issue:
- First, make sure that the IUSR account has access to write to the WordPress site Themes directory
- Second, locate your PHP.ini config file. Mine was in
Program Files\PHP\<version>Make a backup and open the original file in notepad to edit it.
- Change the
upload_tmp_dirvalue to a directory that the IUSR account has write access to. (Beware, values can be set multiple times in the config file so look for duplicate entries.)
post_max_sizeto a file size appropriate for the kind of themes you are uploading. I went with 20 megabytes.
max_input_timeto durations appropriate to the size of the theme and bandwidth of your server. 300 seconds for both settings works well for me.
- Reset IIS
If you're still having trouble create a PHP script with the following code:
<?php phpinfo(); ?>
Run this script and use it to verify that the above settings have been applied. If not, check for duplicate entries in the config file that may be overwriting your settings and verify you've edited the file listed in the output under
Loaded Configuration File
It took me a while to gather up all these pieces so hopefully anyone else having the same issue will end up here first. :)