WordPress Tutorial

How to Increase the Maximum File Upload Size in WordPress

How to Increase the Maximum File Upload Size in WordPress

Introduction

WordPress comes with its own media uploader. It makes uploading files to a blog an easy task – there is no need to deal with FTP clients or File Managers. All media files you want to have on your blog can be easily uploaded by clicking just a few buttons.

However, it’s worth to mention, that media uploader uses PHP to upload files to the server and, unfortunately, there is an upload limit for maximum file size. You can quickly check your WordPress upload file limit in WordPress Admin Dashboard -> Media -> Add New section.

WordPress Maximum Upload File Size Limit

This limit can be different depending on hosting provider (for example, on Hostinger the limit is 256MB and can easily increased) or your WordPress configuration. In most cases maximum file upload limit is more than enough for regular WordPress user. But what if you want to upload a high-quality video file or a big PDF document which exceeds this limit? Trying to upload larger files will cause this file exceeds the maximum upload size for this site error.

WordPress file exceeds the maximum upload size for this site error

There are quite a few different ways to increase upload size in WordPress and in this tutorial we will go through them.

[optin-monster-shortcode id="cgx87nzwxn0himxw62bn"]

What you’ll need

Before you begin this guide you’ll need the following:

  • Access to hosting control panel
  • Access to WordPress administrator dashboard

Method 1 – Increasing max upload size in .htaccess

Many hosting providers allow changing various PHP settings via .htaccess file. Thus by applying php_value upload_max_filesize rule in .htaccess file you can increase PHP maximum file size upload limit.

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

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

Edit

You need to add the following codes at the bottom of the file:

Once you are done save the changes by pressing Save icon at the top left corner.

Code

Method 2 – Configuring php.ini file

IMPORTANT: This method is the most suitable if you host your WordPress on VPS. Many shared hosting providers do not allow editing php.ini file. If you are using shared hosting, contact your hosting support team to make sure you can apply changes to php.ini file.

If .htaccess method did not work for you, you could try increasing WordPress upload limit by editing php.ini file. Access your files by using File Manager, FTP client or even SSH (if it’s supported) and look for php.ini file in your root directory. If you cannot see such file, create it and enter the following rules:

Once you are done save changes and revisit your WordPress admin area –> Media -> Add New section to confirm the change.

Method 3 – Changing maximum upload size in cPanel

If your hosting provider is using cPanel and allows changing PHP settings, you can easily increase maximum file upload size:

  1. Access cPanel and look for Select PHP version in Software section.
    Select PHP version
  2. Click on Change to PHP options.
    Change PHP Options
  3. Modify the post_max_size and upload_max_filesize values.
    Increase upload size in cPanel
  4. Click on Save button to save the changes.

Method 4 – Modifying wp-config.php file

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

Access WordPress files using File Manager or FTP client, locate wp-config.php and amend the above line to the bottom of the file. Once you are done, wp-config.php should look similar to this:

WordPress wp-config.php upload limit increased

Conclusion

By finishing this tutorial you have learned how to increase the maximum upload file size in WordPress, you will be able to upload bigger files from now on.

WordPress Upload Limit Increased

2 Comments

Click here to post a comment

Join thousands of subscribers worldwide

and get awesome deals & the newest tutorials to your email

Please wait...

Thank you for sign up!

More in WordPress Tutorial
How to fix the ERR_TOO_MANY_REDIRECTS on WordPress
How to fix the ERR_TOO_MANY_REDIRECTS on WordPress

Close