Web Development

Error: The uploaded file exceeds the upload_max_filesize directive in php.ini

The uploaded file exceeds the upload_max_filesize directive in php.ini

Below steps worked for me. Hosting server Netregistry.

Create a php.ini file in your public_html/ folder

Code:

upload_max_filesize = 64M
post_max_size = 64M
memory_limit = 400M
file_uploads = On
max_execution_time = 180

Making your php.ini global for your hosting account

  • Modify or create the file called .htaccess inside your public_html/ folder
  • Add the following code to the start of the .htaccess file:

suPHP_ConfigPath /home/USERNAME/public_html/

“USERNAME” is your cPanel username.

 

Reference:

Netregistry support: Using php.ini to modify your cPanel Hosting PHP settings

Awesome WordPress Themes & Plugins