How to set the PHP maximum upload file size in an .htaccess file

Unable to upload large file to WordPress? No problem. You can increase the file size by adding rule in .htaccess

  • Login to cPanel
  • Go to File Manager from cPanel.
  • Now go to your document root and open .htaccess file by right click. Then click on the “Edit”
  • Now put the following code. And update as per your desired size.

    php_value upload_max_filesize 512M
    php_value post_max_size 512M
    php_value max_execution_time 300
    php_value max_input_time 300


  • Now save the .htaccess file. That’s it.
  • 26 Users Found This Useful
Was this answer helpful?

Related Articles

Steps to Setup Node.js for Web Applications Using End User Interface

Node.js is an open source server environment that runs on various platforms (Windows, Linux,...

How You Can Easily Install Auto SSL Certificate In Your Website

Here is how to initiate an AutoSSL check from your cPanel account. Step1:  Log into your...

How to trace route | Running a Traceroute

Running a Traceroute Take the following steps to run a traceroute in Microsoft® Windows®:...

My website is not opening or Cannot see my site? What could be the issue?

There are several reasons why you might not be able to view your site. We have listed the most...

How do I add a subdomain?

1) Log into your cPanel.2) Click on the "Subdomains" icon.3) Type in the subdomain you wish to...