I am unable to upload a plugin, it shows an error of max size, I only have the wp-admin. I have been facing this issue many times when trying uploading a plugin. I am a new in wordpress.
Generally Size limits are configured in php.ini file. If you do not have server access. go to wp-config.php file or index.php file and set upload_max_size to higher memory.
Something like this :
ini_set('upload_max_filesize', '10M');
Please try by using this plugin https://wordpress.org/plugins/wp-maximum-execution-time-exceeded/
Related
I need to increase my upload file size limit in my Wordpress site - it's currently set at just 2MB. I have tried everything, from editing functions.php, creating a php.ini file, updating the .htaccess file, calling my hosting provider who told me "you're on the right track!" and offered no other help. When I look at the info for the site (here!) it says my upload limit is 64M, which is what I set it to following all the tutorials I read, but when I actually look in my media uploader in Wordpress, it still has a limit of 2MB. Am I missing something? Any help much appreciated!
After tearing my hair out, I figured out the solution: the php.ini file needs to go in the wp-admin folder. All the tutorials I read specified other folders to put this file in (everything from the theme folder to the cgi-bin folder, etc). In the end, it worked fine in the wp-admin folder, I can now see my limit in the uploader is at 64m. If anyone else is struggling, try that!
I see you found the solution already though a good practice is to increase 2 variables in the php.ini file, located to the folder of your site:
post_max_size 200M
upload_max_filesize 200M
That will set-up the limit to 200Mb and after clearing cache you should see it in the Media tab in the WordPress Dahsboard.
Unless if there is another limit involved from the hosting, that should work like a charm.
Like many I have gotten stuck with Wordpress 2mb upload limit, I've done the research and it seems I need to change the php.ini file. I normally just use Cpanel for everything however for some reason, php.ini file is not accessible using Cpanel, I have full rights/access etc.. to server.
So the question, how do I access the php.ini file?
I note that the line of code to do this is probably very simple, but given I have no idea what to do with a line of code, it's ultimately useless to me, so please an idiots guide would be really useful.
It appears I am not the only one with this issue - How can i Increase Max_file_upload_size in CPanel using wordpress
All we want to do is increase the upload_max_filesize from 2M - there have been many suggestions using wp-config or index.php - but none of these seem to work.
It appears the only way to do this is to change the php.ini file, however this is only available to those who can connect using ssh, which doesn't work for me despite many hours of typing things into a terminal (I have the rights, just don't know what to do and can't find a step by step explanation online which works)
Does anyone else have any ideas ??
You can install PHP.ini Manager plugin for cPanel. Check if this works for you.
You could just try adding this to the 2nd line of your WP Config file.
This line handles your upload max filesize size and your php memory.
// this will change your max file size upload AND your php memory
define( 'WP_MEMORY_LIMIT', '64M' );
More info can be seen here regarding this code from the WP Codex (2/3 down the page):
WP Memory Limit - WP Codex
EDIT:
You can also you .htaccess file if your host/ini file allows you too.
php_value upload_max_filesize 64M
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'.
WordPress/Azure
I have edited my php.ini and changed upload_max_filesize from 2MB to 64MB successfully. Here you can see my phpinfo() results: http://www.lurkingpixels.com/wp-admin/info.php
I also wrote another script to verify that the values have changed indeed: http://www.lurkingpixels.com/wp-admin/info2.php
Yet, when i visit my wordpress panel and try to upload media, plugins or themes the same message keeps on popping up: "The uploaded file exceeds the upload_max_filesize directive in php.ini."
My problem more specifically is that i want to upload a theme larger than 2mb, i have tried other workarounds like uploading the unziped theme directly to my wordpress content folder via FTP. However wordpress doesn't "see" my theme.
Any ideas?
Thanks for your time!
Wordpress doesn't see your theme means you need to check if style.css is there and if the theme files are unzipped properly. Usually when you upload theme using FTP, Wordpress takes it without issue. That's what my workaround has been with Upload Max limit issues.
However if you are unsuccessful with php.ini try creating a php.ini file with same code and upload it to wp-contents folder where your theme gets uploaded.
You can also try adding this on top of wp-config.php
define('WP_MEMORY_LIMIT', '64M');
I have two domains, webhosted on 000webhost.
I installed wordpress on them and for some days it functioned well, but now it shows me the following error on both of them:
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 122880 bytes)
The source of the error ("in...") is never the same (it always changes).
I found that this error is common, but here I don't have a php.ini file.
I understood that I should change the wp-config file.
Well, here's the catch: how should I do this?
I understood that I should add
define (‘WP_MEMORY_LIMIT’, ‘...M’); // increase limit to ..M" (adding 64, 96 or 128)
[thanks to http://www.dummies.com/how-to/content/optimizing-the-wordpress-configuration-file.html]
I'm not good at programming (just a newbie who wants his own domain), can you help me?
Please there me EXACTLY where to put the function.
If this is not how to solve the problem, please offer me another solution.
I am quite in a great need of help :)
I can't post the file here (it seems I don't format it well), but I can explain the structure:
introduction: "* The base configurations of the WordPress. [...]
After that, MySQL data.
Then, "Authentication Unique Keys and Salts."
"WordPress Database Table prefix"
"WordPress Localized Language, defaults to English"
"For developers: WordPress debugging mode"
" That's all, stop editing! Happy blogging."
So, where should I introduce the define function (if in this file, where?), if in another, which and where?
For 000webhost, you should be able to override php.ini values using a .htaccess file stored in your public_html.
I'm not sure what values they allow you to override, but to raise the memory limit to 128M (the standard, I presume it was lowered to 64M), try putting this in .htaccess;
php_value memory_limit 128M
If you don't have access to php.ini and updating .htacess file gives you Internal Server Error you could try to add this line in wp-settings.php
ini_set('memory_limit', '128M');
Changing the memory limit only hides the problem, it doesn't solve it.
You currently have 64MB of memory, which should be more than enough for your needs. If it's not, then there's almost certainly a leak in your code, or possibly an infinite loop.
Instead of trying to hide the error in a corner, try fixing it. Look at where the error happens, see if you can find what the "last straw" is that makes it exceed the memory limit.
GoDaddy seems to reduce the memory_limit value to 64M by default.
I had spend a day or two trying to increase the size, by changing the .htaccess file and php.ini file in the /public_html folder. But atlast I got the issue resolved as follows:
Logged into Control Centre
Opened CGI Admin > PHP
Opened the phpmyinfo of my PHP version in the page (4 & 5 were shown, and mine was PHP5)
On the first line, there is a note specifying that "the configuration shown is not from the user's php5.ini file". Guessed the ini file to be php5.ini and not php.ini
Created a new file with all the configurations copied from the php.ini file in the root folder, and named it php5.ini
Added a new line memory_limit = 128M
Uploaded it to the root folder (/public_html) and it worked.
If you are using GoDaddy you should check which php version is your hosting running.
Happened to me that I was running 5.2 when the latest available was 5.4.
You just have to log in to the hosting manager and check the version in Programming Languages.
its well-known error easy to solve just do simple editing wp-config.php file
First, open your wp-config.php which is located in the root WordPress directory. Then add the following line inside the main php tag:
define('WP_MEMORY_LIMIT', '64M'); or change 64M to your need.
I turned off plugin AMP, sovled.
Go to wp-config.php file and put this code right under the very 1st php line (so this code will go on line 2 and 3)
//increase WP Memory Limit
define('WP_MEMORY_LIMIT', '256M');