1

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.

james jelo4kul
  • 839
  • 4
  • 17
new_frontenddev
  • 173
  • 3
  • 6
  • 20
  • 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. – galfaro Sep 22 '15 at 00:57
  • I did try to put it in wp-admin too – new_frontenddev Sep 22 '15 at 15:40
  • I have to ask, you're sure the file sizes are NOT over the memory limit? – Geoffrey Hale Sep 22 '15 at 21:38

3 Answers3

0

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.

Geoffrey Hale
  • 10,597
  • 5
  • 44
  • 45
0

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)

new_frontenddev
  • 173
  • 3
  • 6
  • 20
0

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

@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
blackhill24
  • 422
  • 14
  • 30