How to increase the upload size in WordPress?

WordPress is released with its own media uploader. It makes uploading files easier, no need to manipulate with FTP client or File Manager. All media files you want on your blog will be easy to upload with a few mouse clicks.

However, However, it limits the file upload size. Unfortunately, there is a limit to uploading due to the size of the files. You can easily check the upload size via WordPress at WordPress Admin Dashboard  -> Media  -> Add New.

check wordpress upload size

This limit may vary depending on your hosting provider or your WordPress configuration. In most cases, the maximum limit of a file to be uploaded is enough for regular WordPress users. But what if you want to upload a high-quality video file or a large PDF file but is limited?

Try to upload a large file and you will get the error this file exceeds the maximum upload size for this site.

There are several different ways to increase the upload size limit via WordPress and in this tutorial, we will go through these.

What do you need for doing it?

Before getting started, you’ll need the following information:

  • Access to control panel of hosting
  • Visit the WordPress admin page

Method 1 – Increase max upload file size in .htaccess

Many hosting providers allow you to change your PHP configuration via a .htaccess file. So, just apply the php_value upload_max_filesize rule in .htaccess and you will be able to increase the upload size limit via PHP.

We will use the File Manager to fix the .htaccess file, but the same can be done via the Filezilla FTP client. You should be able to find the .htaccess file in the same directory as your WordPress. For example, if you can access the blog via yourdomain.com, WordPress and the .htaccess file will be in the public_html directory.

Once you have located the .htaccess file, select it and click the Edit button.

You need to add the following lines to the .htaccess file:

htaccess file

Once added, click the Save icon in the upper left corner.

save htaccess file

Method 2 – Configure php.ini file

IMPORTANT: This method is suitable if you host WordPress on VPS. Many shared hosting providers do not allow editing php.ini files. If you are using shared hosting, contact your hosting provider to find out if you are entitled to change the php.ini file.

If the .htaccess method doesn’t work, you can try increasing the WordPress upload limit by fixing the php.ini file. Access your files using File Manager, FTP client or SSH  (if supported) and find the php.ini file in the root directory. If you do not see the file, create it and enter the following rules:

php ini change

When you’re done, you can revisit the WordPress admin area  -> Media  -> Add New to see if the changes have been applied.

Method 3 – Resize upload file size in cPanel

If your hosting provider is cPanel and allows to change the PHP configuration, you can easily increase the maximum upload file size here:

Step1: Access cPanel and find Select PHP version in the Software section.

select php version cpanel

Step 2: Access to Change to PHP options.

change php version

Step 3: Edit post_max_size  and upload_max_filesize values

edit upload file max size

Step 4: Click the Save button to save changes.

Method 4 – Edit wp-config.php file

Do not worry if the above methods do not work. Another way to increase upload limit in WordPress is to add the following line to the wp-config.php file :

define (‘WP_MEMORY_LIMIT’, ‘128M’);

Access the WordPress file using the File Manager or Filezilla FTP client, locate wp-config.php  and add the above line to the bottom of the page. When done, you should see wp-config.php  like this:

edit wp config file

By completing this tutorial, you have known how to increase the maximum upload file size on WordPress, you will be able to upload larger files from now on.

Good luck to you! Don’t forget to leave a comment if you need help or have a question.

You May Also Like
About the Author: Luong Ngoc Anh
Leave a Reply

Your email address will not be published. Required fields are marked *