Increase the Maximum File Upload Size in WordPress

How to Increase the Maximum File Upload Size in WordPress in 4 Simple Steps

Learn how to Increase the Maximum File Upload Size in WordPress by using the .htaccess file. A useful and simple method when your site is hosted on an Apache web server.


In this blog post, we will discuss how to increase the maximum file upload size in WordPress using the .htaccess file. WordPress is a powerful content management system that allows users to create and publish content with ease. However, one of the most common issues that users face is the inability to upload large files to their WordPress site. Fortunately, there is a simple solution to this problem.

What is the .htaccess File?

The .htaccess file is a configuration file on Apache web servers. It allows you to modify the server’s behavior and set rules for your website. The file is located in the root directory of your WordPress site.

How to Increase the Maximum File Upload Size in WordPress using the .htaccess File?

Step 1: Access the .htaccess File

The first step in increasing the maximum file upload size in WordPress is to access the .htaccess file. You can do this by using an FTP client or through the cPanel file manager.

Step 2: Edit the .htaccess File

Once you have accessed the .htaccess file, you need to edit it. Add the following code to the file:

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

The above code sets the maximum file upload size to 512MB, post size to 512MB, and maximum execution time to 300 seconds. max_input_time is set to 300 to help prevent errors that occur when uploading large files or importing/exporting large amounts of data. Basically, you can change these values as per your requirement.

Step 3: Save the .htaccess File

After making the necessary changes, save the .htaccess file and upload it to the server.

Step 4: Test the Changes

Once you have saved and uploaded the .htaccess file, it’s time to test the changes. Then go to the WordPress Media uploader and Press Add New. In the bottom left corner it will say the new file upload size. F.e. mine says Maximum upload file size: 512 MB. If the number corrosponds with the number in the htaccess file, then everything works as it should.

That’s it!

Increasing the upload limit in WordPress using the .htaccess file is a simple process that can be done by anyone. Following the steps mentioned in this blog post, you can easily start uploading large files to your WordPress site.