WordPress max upload size error on XAMPP - wordpress

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.

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.

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

Related

"The link you followed has expired." message when activating or deactivating plugin

I am getting an error showing in Wordpress when trying to activate or deactivate a plugin.
It results in this error message: "The link you followed has expired."
Have done some research on the internets, the consensus is to add the following to the htaccess file:
php_value memory_limit 256M
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 1000
I have done this similarly in the php.ini file.
Don't believe these settings are the answer as when I click "activate" it doesn't really take much time to load it will go straight to the page.
Have also looked at the caching program WP-Rocket, no solution there either.
Updated to include the server settings here:
can you also add the following value in .htaccess
php upload_max_size = 64M
Method 2
Have you tried editing the php.ini file with the following, if you do have access ?
memory_limit = 256M
upload_max_size = 64M
post_max_size = 64M
upload_max_filesize = 64M
max_execution_time = 300
max_input_time = 1000
if both of them do not work,we will need more information about your envirnment- wordpress,php version ? are you on local or on a staging environment?

How to Increase Maximum Upload File Size in WordPress in LOCALHOST

I have a huge file, 7GB to upload on my localhost. It is a copy of my live website that includes almost everything - themes, contents and media files.
Is there any way to migrate this? I tried to use All-in-One WP Migration plugin but the upload limit is only 300MB.
Another way to increase is by editing the .htaccess, but I cannot find it in the localhost.
Update .htaccess file
php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value memory_limit 256M
php_value max_execution_time 300
php_value max_input_time 300
Just do the following steps, it may increase your size.
1. Editing the .htaccess File
Increase additional PHP limits by adding these lines into the .htaccess file :
php_value post_max_size 256M
php_value memory_limit 512M
php_value max_input_time 180
php_value max_execution_time 180
2. Editing the wp-config.php File
the wp-config.php file located in your root directory. edit the wp_config. php file. Add the following line.
#ini_set('upload_max_size' , '256M' );
3. Updating php.ini
Navigate to your php.ini file and edit it. If you can’t find it, ask assistance from your hosting providers.
Locate the upload_max_filesize and increase it by changing its number. You can also boost a few other limitations, as shown below:
upload_max_filesize = 256M
post_max_size = 256M
memory_limit = 512M
max_execution_time = 180
Save the file, and that’s it, the error should no longer occur.

Increase Wordpress WXR (.xml) Import Max File Size?

When importing a WXR (.xml) file from the Wordpress import screen under tools to pull in a backup of posts/pages/etc. it says Max File size is 8mb. Of course most sites of size will have much larger files and I am having trouble figuring out how to increase that.
I have tried the following:
added to php.ini file:
php_value upload_max_filesize 50M
php_value post_max_size 50M
added the following to functions.php file:
#ini_set( 'upload_max_size' , '50M' );
#ini_set( 'post_max_size', '50M');
added to the wp-donfig.php file:
define('WP_MEMORY_LIMIT', '64M');
added to .htaccess:
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300
None one of these seem to be where the limit is coming from. Any help on increasing the limit would be greatly appreciated. Thank you in advance for your answers.
After trying everything above to no avail I tried the following and it worked.
Create a file called .user.ini with the following and place it in your Wordpress installation folder.
upload_max_filesize = 64M
post_max_size = 64M
memory_limit = 64M
max_execution_time = 300
This is for anyone running php 5 or newer.
This answer does not work for me. It's wordpress multisite installation.
What I did is to increase post_max_size, upload_max_filesize and memory_limit values accroding to the #Brandon's answer.
And connected as admin of network, go to network settings and finally increase max size files value.

Wordpress File Upload Error — File Size or Timeout?

I get an http error while trying to upload large files to Wordpress. I've edited the php.ini and .htaccess files to updated the file size and time limits. This is somewhat new territory for me. Am I missing something?
php.ini
post_max_size=90M
upload_max_filesize=90M
memory_limit=90M
max_execution_time=3600
.htaccess
php_value post_max_size 90M
php_value upload_max_filesize 90M
php_value memory_limit 90M
php_value max_execution_time 3600
php_value max_input_time 3600
php_value session.gc_maxlifetime 3600
Try this :
Add WP_MEMORY_LIMIT into your wp-config.php file.
This setting may not work if your host does not allow you to increase the PHP memory limit.
In wp-config.php
define('WP_MEMORY_LIMIT', '64M')

How to increase file size in wordpress version 3.6

im trying to increase the file media size in wordpress but having no look i have done the pho.ini file and increased it that way but no look, perhaps wordpress have locked it down so you cant change the maximum file size, ive had a look around blogs and everyone is using the php.ini file but none of the blogs are very recent so i cant get a solution because they are all for the old versions of wordpress. and my hosting provider hasn't capped my upload limits, my current php.ini file is this:
memory_limit = 52M
upload_max_filesize = 100M
upload_max_filesize = 100M
post_max_size = 100M
i have changed this many a time to increase my file upload limit to 6GB.
You can also do it for your domain from your end..YOu can either do it from wp-config.php or .htaccess file of your domain. Here is the code for that:
For wp-config.php:
define(’WP_MEMORY_LIMIT’, ‘64M’);
For .htaccess:
php_value memory_limit 64M
Thanks,
The location of the file php.ini depends on the installation of PHP.
The safest way to know it, is through the following script:
phpinfo();
Modify the php.ini file
upload_max_filesize = 64M
post_max_size = 64M
Created a .htaccesss file in the wordpress root dir with the following:
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300
For wp-config.php file in the wordpress root dir:
define(’WP_MEMORY_LIMIT’, ‘64M’);

Resources