Matt
Matt

Reputation: 395

WordPress max upload size error on XAMPP

When I try to upload a theme that is roughly 2.3MB when zipped, I get this error message:

The uploaded file exceeds the upload_max_filesize directive in php.ini.

In order to remedy this, I have modified the php.ini file in the wp-admin folder to specify:

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

Yet, it still does not work. I have tried restarting my XAMPP server and clearing my cache but it still gives me the same error message. I have also tried placing a file called "php5.ini" with the same contents as the "php.ini" file in the same wp-admin folder--still nothing.

Upvotes: 4

Views: 13786

Answers (2)

Adim Victor
Adim Victor

Reputation: 104

Had this problem but editing my php.ini file with similar configurations did not work. What worked for me was adding the following lines to my .htaccess file.

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value memory_limit 400M
php_value max_execution_time 180
php_value max_input_time 180

Upvotes: 3

I have modified the php.ini file in the wp-admin folder

This does not sound right. The parameters your setting are all fine, but if you're using Windows, the location of the php.ini file should be:

xampp\php\php.ini

On Mac, it should be:

private/etc/php.ini

Just make sure you edit the php.ini file at the right location, then save and restart the httpd service (or reboot) when done and you should be fine.

Upvotes: 6

Related Questions