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.
Related
Im trying to import an existing revolution slider template from one site to another.
Whenever im importing the .zip file i get the error below
"Exceeded filesize limit"
I have already tried increasing all limits in the .htaccess file:
php_value memory_limit 256M
php_value post_max_size 256M
php_value upload_max_filesize 64M
php_value max_input_vars 1800
php_value max_execution_time 300
php_value max_input_time 300
But it is still not working.
Im stuk at the moment.
All help is appreciated.
Thanks
locate the file PHP.INI
wamp64\bin\apache\apache2.4.51\bin
modify this lines
max_input_vars = 2500
memory_limit = 128M
you can increase the value according to your wish
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?
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.
I included below line of code in .htaccess file but still it showing same memory limit (upload file size) on my wp page
https://cbseneet2019.co.in/neet-2020-result/
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
please resolve this issue.
Hi, check if the file has write permission or not using terminal.
As of now wordpress 5.3 gives the default file limit of 100MB.
If using Wordpress 5.2
Now let's understand the meaning or use of keywords.
upload_max_filesize
This defines the maximum upload limit for files.
post_max_size
This defines the maximum upload limit that will be handled in a POST request.
memory_limit
This defines how much memory is allocated for PHP. This number should be equal or higher than the upload_max_filesize.
Now you can modify the .htaccess file (located in the root directory of wotdpress project) and add the below code before the "# END WordPress" in the .htaccess file.
php_value upload_max_filesize 50M
php_value post_max_size 70M
php_value memory_limit 100M
php_value max_execution_time 300
php_value max_input_time 300
Before upload (reflection made using .htaccess with new code)
Before Upload
.
On time of upload On time of upload
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’);