cpanel The uploaded file exceeds the upload_max_filesize directive in php.ini

We just moved our shared hosting from GoDaddy's linux hosting to the new cPanel hosting. I am trying to move over my websites and the wordpress ones work fine, until I try to upload new media.

No matter what I do the error is always: The uploaded file exceeds the upload_max_filesize directive in php.ini.

To migrate my site, I did the following:

  1. Exported my Database.
  2. Created a database in the new host (cPanel)
  3. Then I imported the database
  4. I corrected the wp-config file
  5. I uploaded all my files on to the correct folder for that site.

The website works fine and looks fine. Until I try to upload the images.

Solutions tried 1. created a php.ini and pasted - upload_max_filesize = 100M memory_limit = 200M post_max_size = 300MB 2. tried it by renaming to php5.ini 3. tried changing the .htaccessfile 4. tried talking to godaddy that basically said its nothing on their side and they dont know what to do

I am frustrated I do not understand what created this issue and why it refuses to work.

Are you trying to upload the new media via WordPress? Please try via FTP.

Option 3 - Try uploading files via FTP.


You've already tried Options 1 and 2.

Option 1 - Find php.ini and change:

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 2M

Option 2 - Try asking your hosting provider to increase the php memory limit for you.

How to Fix the uploaded file exceeds the upload_max_filesize , ini via cPanel. If your host uses cPanel, you should be able to edit your php.ini file and upload_max_filesize directive via the  What Causes the uploaded file exceeds the upload_max_filesize directive in php.ini. Let’s start at the beginning. In order to preserve your server’s resources, hosts set a limit on the maximum size of a file that can be uploaded. This maximum, in megabytes, is defined in the upload_max_filesize directive.

I started a fresh cPanel (reset everything). I used the wordpress APP to install my first add on domain (I am yet to confirm if this is the real reason it works)

I think what fixed it was that I created a php.ini *if you have cPanel the file has to be php.ini (not php5.ini) + the .user.ini file [keep in mind I had tried this step before but I do not know why it was not reading it and accepting it]

files_upload = On
post_max_size = 200M
upload_max_filesize = 100M 

in both the .ini files

and used kill processes (which never actually showed any processes)

How can i Increase Max_file_upload_size in CPanel using wordpress, this will change your max file size upload AND your php memory define( uploaded file exceeds the upload_max_filesize directive in php.ini”,  Re: The uploaded file exceeds the upload_max_filesize directive in php.ini The easiest place to change this is in the Select PHP Version menu in cPanel. In the upper right you'll see switch to PHP options.

you can try forcing this in your themes function.php with

@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');

uploading issue upload_max_filesize, file through word press & getting the following error. Upload failed! The uploaded file exceeds the upload_max_filesize directive in php.ini. ''The uploaded file exceeds the upload_max_filesize directive in php.ini''. wordpress problem. I have created an .ini file into my public-html and paste this : memory_limit = 256M. upload_max_filesize = 50M. post_max_size = 50M. max_execution_time = 300. I waited a day but still nothing is happening.

Cpanel Wordpress Site Error The uploaded file exceeds the , Cpanel WordPress Site Error The uploaded file exceeds the upload_max_filesize directive in php.ini. While working with a Cpanel Website running WordPress,  How to the uploaded file exceeds the upload max filesize directive in php ini | wordpress plugin The uploaded file exceeds the upload_max_filesize directive in php.ini The uploaded file exceeds

How to Fix The Uploaded File Exceeds the upload_max_filesize , The uploaded file exceeds the upload_max_filesize directive in php.ini in If you are working from a client system, a file manager (or cPanel)  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”) You may also want to increase your max post size. Look for this line in your php.ini file “post_max_size” and increase it as well.

Solved: The uploaded file exceeds the upload_max_filesize , uploaded file exceeds the upload_max_filesize directive in php.ini Log in to your web hosting account and go to cPanel; Click on FILES  One of the most common of these settings is the maximum upload filesize ("upload_max_filesize"). This is a setting commonly found within a file known as the php.ini file. There are a few common errors that occur in Wordpress and other PHP-based programs that use the php.ini for certain settings.

Comments
  • Did you try placing it inside the wp-admin folder? I had a similar issue with godaddy and it needed to be placed there. You can also try creating a user.ini file and see if that works. In my experience I needed to create both for different reasons.
  • I did try to put it in wp-admin too
  • I have to ask, you're sure the file sizes are NOT over the memory limit?
  • tried the ftp one too. It doesn't upload, I do not understand why
  • Can you ftp any kind of file to that or any other directory?