Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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"

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Here are a number of steps I had to take to resolve the issue:

  1. First, make sure that the IUSR account has access to write to the WordPress site Themes directory
  2. 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.
  3. Change the upload_tmp_dir value 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.)
  4. Change upload_max_filesize and post_max_size to a file size appropriate for the kind of themes you are uploading. I went with 20 megabytes.
  5. Change max_execution_time and max_input_time to durations appropriate to the size of the theme and bandwidth of your server. 300 seconds for both settings works well for me.
  6. 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. :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.