I get this error when I try to upload a theme to Wordpress. It's localhost server and I use XAMPP control panel. I have done the following but it's still not working:
Created a info.php file in wp-admin folder but can't access localhost/wordpress/wp-admin/info.php (it says page not found).
Found the php.ini file in C:/Program Files/IIS Express/PHP/v7.0 and edited the post_max_size and upload_max_filesize to 1000M but it doesn't work.
The theme file is only 28 MBs, so I thought a 1000M post_max_size and upload_max_filesize would do.
Please help me with this issue. Cheers!
Be sure you're editing the correct php.ini file. Generally, XAMPP files are not located in the IIS folder (they're more likely in C:\xampp\ somewhere). The 'A' in XAMPP stands for apache, and IIS is a different/competing web server.
The easiest way to check your upload limit (and PHP ini file location) is to create a new file in your web root with the following contents:
<?php
phpinfo();
If you navigate to that, does it have the upload limit you've specified?
(Make sure you remove the file after you're done checking)
Related
I read all the suggestions online but none of them working for me .The problem I'm having is when I'm trying to upload an image on WordPress it gives HTTP error. I did change the ('WP_MEMORY_LIMIT', '2000M'); but still did not work. I am running with xampp.
change it globaly in php.ini (in xampp located in '\xampp\php\php.ini'):
memory_limit = 256M // search for this "memory_limit" and adjust it by your needs.
if there is no memory_limit in your php.ini file add it and restart xampp/web server
I am trying to upload the Divi theme on the Ricky server with helio host, and I get an error that says `The uploaded file exceeds the upload_max_filesize directive in php.ini.' I looked in the wp-admin folder on my server and did not see the php.ini file, so I created one and added this code:
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
This did not seem to help as I kept getting the same error message. I tried installing the plugin "Upload Max File Size" but it did not seem to help either. I read through some blog post, and forum discussions but could still not seem to figure it out. Any help would be greatly appreciated.
Noah
The php.ini file is the main configuration file for php. It is not located in the wp-admin folder. If you have a vps you can looking the location of that file with a php_info(), else you have to ask to your provider.
If you can't edit your php.ini file, you can :
use the ini_set() function
upload the theme with ftp
Php.ini doc page
When I tried to upload a plugin for my Wordpress template in wamp 2.0 I got an error:
The uploaded file exceeds the upload_max_filesize directive in php.ini
How to fix this error?
Seeing as though you've mentioned WAMP, I'm going to assume you can edit the php.ini file?
If you left click on the WAMP icon in the status bar, select the PHP menu and then click on the php.ini file in that menu. Just open it in Notepad is fine.
Then in Notepad, do a search (CTRL+F) for "upload_max_filesize", and then you can change the value that is set there.
I don't remember what the default is, but for mine, I have it set to "200M" (without the quotes). This means 200mb.
Save the file, close it, and then restart WAMP.
You should then be right to upload your plugin
We have seen this error at least once if we have used WordPress.When installing a theme, plugin or uploading an image or file, It has nothing to do with the theme or plugin. The issue is with our server settings which limit the maximum size for uploaded files.
It’s a common error and it can be easily fixed. This error message is an indication of that the file you are trying to upload is larger than your web host allows (WordPress default file upload size is 2 MB).
The uploaded file exceeds the upload_max_filesize directive in php.ini
Solution:
A solution is easy, need to increase the file size upload limit.
If using WordPress on a local machine using XAMPP, we will find the php.ini in the following locations.
Windows: C:/xampp/php/php.ini
Open the php.ini file. Find these lines in the php.ini file and replace it following numbers
upload_max_filesize = 64M
Save the changes and refresh your website and try uploading the file again. You will now get success.
In Wamp > PHP > php.ini file, put or edit these lines, and then restart your Wamp server.
post_max_size = 750M
upload_max_filesize = 750M
max_execution_time = 5000
max_input_time = 5000
memory_limit = 1000M
This error is because your upload_max_filesize variable in php.ini file is adjusted to 2Mb.. change it to 64Mb!!
This video tutorial will help you fixing your error in 60 seconds!! Hope it helps
A Solution is easy, you just want to add plugin in your WordPress.
Download your .zip file of plugin.
Extract the .zip file.
Now, upload the extracted folder to ../wp-content/plugins/ location.
Go to the Installed Plugins page in WordPress, Now you can see the plugin is there, which you have recently uploaded.
Finally, click activate link.
Open your xampp software and click on config button in front of apache option and select php.ini option
Next find this code
upload_max_filesize=2M
and replace with this code
upload_max_filesize=64M
Now restart apache and mysql and enjoy it
I use MAMP. To locate the 'php.ini' file, if you also use MAMP, the way Is as follows:
Go to the folder location where the MAMP is installed. For example, 'C:\MAMP' Is the folder location of MAMP.
Go to 'conf' folder.
From 'localhost:8888/MAMP', you will get 'phpinfo' link under PHP section. Click on the link and from the directed page, get the version of PHP is installed into your system.
From 'conf' folder, go to the folder with the version of PHP you got in the previous step.
Go to that folder and you will get the required php.ini file.
Open that file in any text editor and update the info:
(memory_limit = 64M, upload_max_filesize = 128M, post_max_size = 512M)
Restart MAMP.
Then you are good to go for uploading big files into your local server.
Find this line in the php.ini file upload_max_filesize = 2M and replace it with a higher value (e.g. upload_max_filesize = 64M)
And restart wamp..!
If you're using WAMP 2 you should update to Release 3.2.3.x with the GUI you can set upload_max_filesize to 64MB recommended to do so follow the instructions.
Click WAMP icon at taskbar
Go to PHP
PHP Settings
Find "upload_max_filesize" and select the size
Locate the php.ini file in your local dir. I use Xampp. =>C:\Xampp. Now find the line where it says
upload_max_filesize = 2M
and change this to your desired value.
upload_max_filesize = 56M
Restart all your services and you should be able to upload your new files.
Windows: C:/xampp/htdocs/wordpress_project/.htaccess
php_value upload_max_filesize 1000M
php_value post_max_size 2000M
php_value memory_limit 3000M
php_value max_execution_time 180
php_value max_input_time 180
// in end tag of wordpress
I am trying to download this template on Joomla 3.2 extension manger :
http://scriptmafia.org/templates/115622-yt-moustache-yootheme-for-joomla-25-32.html
but every time I upload it, it gives me this error:
There was an error uploading this file to the server.
I have read articles about "increase the upload max size in the php.ini file".
I have tried to find this file in the administrator files section in Joomla, but it is "not found".
So how can I fix this problem? It has not happened for this template only, it has happened for several. So I am almost sure it is due to the upload size.
Edit your php.ini and increase *upload_max_filesize* and *post_max_size*; then restart your web server.
If you don't know where is your php.ini, create a php file to discover: echo php_ini_loaded_file();
The returned path is where your php.ini is located.
EDIT
Well, seems like you have a permission error and not size limit. Try to change permissions of the temp Joomla folder (you can see/configure it on Global Configuration > System).
If you are using XAMPP , php.ini file will be located in c:\XAMPP\php folder. Find the file and increase file upload size there.
If you are using WAMP, You can find ini file in /wamp/bin/php directory.
The location may vary from one OS to another.
You can follow this link:
http://www.cyberciti.biz/faq/linux-unix-apache-increase-php-upload-limit/
You can call in your script ini_set function and change values, which have been stored in php.ini (any changes has affected only for current script, but not for global settings)
ini_set('post_max_size', "%value in MiB for example 16M%")
ini_set('upload_max_filesize', "%value in MiB for example 16M%")
You can read more about it at php.net
If you can't resolve the PHP limitation easily, an alternative is to FTP the installation file to the /tmp folder and in Extension Manager -> Install, use the "Install from Directory" option instead.
Had the same issue for the longest time, none of the answers helped. Found that if you are using GoDaddy, and go to your CPanel, scroll down to Software, then choose PHP version, switch to PHP Options, there you can change your upload file size. Hope this helps, took me forever to find it.
Some people might be having a issue with the memory allocation portion of php.ini file "memory_limit" the default for me was 128mb and i was attempting to upload nearly 300mb and it hit that roadblock. After changing the default value to 512mb and restarting the server i was able to get past this limit.
How to change post_max_size and upload_max_filesize in a local installation of Joomla 3 in XAMPP
You can check the php setting in two places – site’s backend under system information – go to php information. Or on browser go to localhost and click on phpinfo. You’ll find the post and upload part under “Core” heading.
Go to c:\xampp\php\
Find the file php.ini
Open php.ini in notepad
Find post_max_size and change value to 20M
Find upload_max_filesize and change value to 20M
Save the file
Logout out of your site backend.
Turn off apache and mysql on xampp and quit
Restart xampp as administrator
Turn on apache and mysql
Open browser and go to localhost
Open phpinfo and search for upload_max_filesize and post_max_size.
Confirm that changes are registered.
This can also happen with the following suhosin setting:
suhosin.upload.disallow_binary = On
Setting it to off temporarily allows you to upload zip files
If you use CPanel, search for PHP version (in the Software section) and click on it, then click on 'switch to PHP Options', the options will display then look for 'upload_max_filesize' and click on the value to change it. Do the same for 'post_max_size'.
I have a wordpress blog. I made a custom page-template that allows users to upload files to my server. Just a simple php script which connects to my server with a form to select a file, blabla.. you know!
However the upload-feature doesn't make any sense with a max_upload_filesize of 20mb.
Now i want to change that. According to my hosting-provider it's REALLY EASY, but i think for normal people without experience in that field it's not. Anyway...
they told me i should create a .htaccess file where my upload-script is housed. So that's actually in my wordpess theme folder.
in the .htaccess file i should place "suPHP_ConfigPath" and the path to this directory.
so in my case this would be: (at least i think that's the path)
suPHP_ConfigPath /clientdata/n5200-2-dynamic/a/l/mydomain.com/www/wp-content/themes/mytheme/
Moreover i should create a php.ini file in the same directory that says:
upload_max_filesize = 500M ;
post_max_size = 500M ;
I did all of that and even created a info.php file in the same directory to check if the thing worked. However the php_info tells me still that the upload-size is set to 20mb.
Did I get anything wrong here? Do you guys have an idea what I'm doing wrong?
Does the php_info in that case even tell me the truth and the script should normally work? or should the php_info tell me that the size is set to the value I changed it to?
First of all, create a test.php file in the theme folder and put this into it;
<?php
phpinfo();
?>
Run http://mydomain.com/.../test.php in a browser and find 'Configuration File Path' on the page. If it does not match the one you mentioned in .htaccess, then the .htaccess is not working. Verify the name of .htaccess file and first make sure .htaccess is actually working first. If not, call your hosting support to help you out.
If the configuration path is showing as the one you specified in .htaccess, then
try putting these lines in the .htaccess file also and see if it works.
php_value upload_max_filesize "500000"
php_value post_max_size "500000"
If htaccess is working, also trying changing the value of the numbers in php.ini to 500000, instead of 500M.
I Hope your problem gets solved soon.
php_value upload_max_filesize 500000000
php_value post_max_size 500000000
instead of that very strange thing you put there
However, it would work only with Apache mod_php