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:
- Exported my Database.
- Created a database in the new host (cPanel)
- Then I imported the database
- I corrected the wp-config file
- 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:
Option 2 – Try asking your hosting provider to increase the php memory limit for you.
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]
in both the .ini files
and used kill processes (which never actually showed any processes)
you can try forcing this in your themes function.php with