Error when Uploading Theme in Wordpress - php

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

Related

The uploaded file exceeds the upload_max_filesize directive in php.ini error while uploading plugin

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

POST Content-Length exceeds the limit Wordpress

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)

WordPress Theme Installation Error 'Are you sure you want to do this? Try Again'

I am trying to install a premium WordPress theme (size=13.4mb) on my blog, hosted by Microsoft Azure. When I try to install the theme, I am getting the following after 100% of uploading the theme:
Are you sure you want to do this? Try again
I have been seeking for a solution for hours now. I read about changing these setting:
max_execution_time 100
memory_limit 256M
post_max_size 32M
upload_max_filesize 32M
How do I change these setting on the Azure platform or is there somewhere a description where this been described step by step about how and where to change the setting in the PHP files?
Please show me how to navigate to the solution to be able to upload themes?
By default on Azure, the upload_max_filesize is set to 8M, we can change the built-in PHP configurations to enlarge it.
Here are the steps:
1, Add a .user.ini file to your root directory.
2, Add configuration settings to the .user.ini file using the same syntax you would use in a php.ini file. With your demand, your .user.ini file would contain this text:
upload_max_filesize = 20M
; Maximum size of POST data that PHP will accept.
post_max_size = 20M
max_execution_time = 300
3, Deploy your web app.
4, Restart the web app.
You can read official guide for more information.
By the way, we can use FTP tool to connect your Azure Web sites server to create and modify the custom configuration file instead of redeploying the project.
The default root directory is D:\home\site\wwwroot.
These settings can be changed in your php.ini file that is hosted by your hosting company. I am not familiar with Asure platform.
However, the error you are getting seems too generic.
The theme you downloaded, are you sure you uploaded the right file. Some themes are a zip file with other files in them and you have to first unzip and then there will be a wordpress theme upload ready zip file that you upload. Look inside the uploading zip file to ensure the folder structure is right.
Also, if you purchased the theme i am sure you can get support from the theme developers.

no file is uploading to my hosting. what's wrong with my php.ini

this is the problem. I bought an hosting. i'm trying to set up an CMS in my website.. what happening is none of my files are uploading to webserver through script..
i'm able to upload it via FTP.
but if i go to WP cms and upload an media or plugin to server it shows "missing a temporary folder"...
i tried with Magento & Prestashop.. both installs but unable to upload product images, files, or anything through them..
is it due to wrong configuration of php.ini file.??
kindly check my php.ini file below:
http://popstores.in/phpinfo.php
kindly help me with the problem. bcoz i'm unable to do any works..
Any information or guidance will be appreciated. Thanks in Advance. :)
chmod the upload folder to the approp permissions? You can google screen shots and you may want to start with 777 on that folder although that setting is not safe but to test. Check the server error logs.
I believe you have to set your upload_tmp_dir to something like /tmp
Also note that your current settings list post_max_size = 8M while your upload_max_filesize = 12M , so your files can't go beyond 8M

The uploaded file exceeds the upload_max_filesize directive in php.ini

I'm using wordpress 3.5.1 and i bought a new theme from themeforest but when i try to upload that theme to my wordpress after uploading it shows the message;
"The uploaded file exceeds the upload_max_filesize directive in php.ini".
Even i tried to upload theme manually via FTP filezilla, it's not showing anything in my wordpress to activate theme.
I edited my php.ini file; its default size was 64M and I changed it to 256M. Still getting the same problem
thanks in advance
Inside the WorldPress panel, you should see "Appearance" on the side. Click on that.
Then hit "Install Themes", and search for your theme there. That does not require any type of upload limit.
1) Open php.ini:
/etc/php/7.0/apache2/php.ini
2) Increase File Size:
upload_max_filesize = 16M
3) Restart:
sudo service apache2 restart

Categories