I need to upload a PDF file to my wordpress site. When I go to Upload New Media, and try uploading it, it says
FileName.pdf exceeds the maximum upload size for this site.
I tried looking for my php.ini file but could not find it. I ran phpinfo()
by creating a new file and then opening it in my browser and found this.
Configuration File (php.ini) Path C:\Windows Loaded Configuration File C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\php.ini
I placed a php.ini files with
upload_max_filesize = 512M
post_max_size = 512M
max_execution_time = 300
in wp-admin, httpdocs and everywhere I had access, nothing worked The max upload file size is just 8 MB. Please help me, My client needs to upload that file.
Note: Please don't tell me to restart server, as I can't, It is a hosted site.
I tried different way like attempted to
but none of these changes worked for me. Then I came across a post somewhere That I summarised in a blog post(find below)
All you need to do is
Your Php.ini may contain following or whatever limit you need
What worked for me was editing the php.ini file at
and adding/editing the following options starting (~ line 786):
Seeing as you're on hosted service, try adding these to your .htaccess file as well:
You won't be able to change these via ini_set();
Try with the following plugin:
I built this code based on the following core function:
Another option is upload via FTP and use the plugin Add from Server.
You have written php.ini file properly. Just mention path of your php.ini file inside .htaccess file using suPHP_ConfigPath/home/username/public_html. Here replace username with your username mentioned in cpanel. You can refer http://www.vinaypn.com/how-to-fix-maximum-upload-size-exceeded-error-in-wordpress-running-on-shared-hosting/
I'm running WHM / cPanel on a CloudLinux based server. I tried everything. The final solution for me was adding a php.ini file to the /wp-admin/ directory with the following;
Keep in mind I previously tried a php.ini in the document root and the web root directories and those didn't fix the max upload limitation.