How to Upload 500 Mb Video to Wordpress
A depression WordPress upload size limit stops you lot from uploading big files, plugins, and themes. If y'all're building a media-heavy website, that can be a considerable obstacle. It'south necessary to increase the max upload size in WordPress or your server (or both) in such cases.
Depending on your hosting provider and server, there are many ways to become about solving this issue. We'll comprehend them all in this article and bear witness y'all how to increase the maximum upload size in WordPress quickly.
Let'south dive in!
Prefer to watch the video version?
What Is the Maximum Upload Size in WordPress?
Uploading big files to a server consumes a lot of the server's resources. To foreclose users from causing server timeouts, the default maximum upload size in WordPress typically ranges from 4 MB to 128 MB. Commonly, the hosting provider sets this limit at the server level.
WordPress likewise includes constants that ascertain this limit, merely they cannot override the server-level settings in nearly cases.
To verify this, go to your WordPress site'due south Media Library. Here, try to upload a file that crosses this maximum upload file size limit. Yous'll see an fault message that looks something like this:

The "exceeds the maximum upload size for this site" error can be frustrating, but it exists for ii main reasons: security and efficiency. It hinders site owners and other users, including malicious actors, from uploading huge files (eastward.g. high-resolution images, large videos).
Otherwise, information technology can result in incapacitating your website'southward server, making your site come to a crawl. Or worse, information technology tin bring your site down altogether!
How to Cheque the Electric current Maximum Upload Size in WordPress
In that location are many means to check your WordPress site's current max upload size. Let'south get through all of them.
In the Media Library
The quickest mode to check your site'due south electric current maximum upload size is to go to your WordPress dashboard, and from there, go to Media > Library. Here, click on the Add New button to activate the media uploader tool.

Equally Kinsta hosts this site, the Maximum upload file size: 128 MB.
bulletin displays below the Select Files button. If yous're using a different spider web hosting provider, you may see a unlike limit listed here.
You lot can also get to Media > Add New directly and see the same message displayed at the lesser.

Again, you lot can see the 128 MB max upload file size here.
In the Site Health Info
WordPress five.two added the Site Health Info tool to assistance you debug your WordPress site improve. Here, yous tin find almost all the data about your server and WordPress configuration.
Every bit both the server and WordPress handle the max upload file size, there are 2 ways to discover its value on this screen.
First, you can find it listed under the Media Handling dropdown. Here, look for the value of Max size of an uploaded file
constant.

The second method is to await under the Server dropdown. You lot'll find many options related to your webserver's setup under here. Please search for the value for Upload max filesize
abiding to see what information technology is. On this site, the max upload file size limit is 128 MB.

You can as well see other PHP constants and their values, such as:
-
PHP mail service max size
: Defines the maximum upload limit for POST requests. -
PHP retentivity limit
: Defines the retention allocated for PHP. It should exist set equal to or college than theUpload max filesize
limit. Or else the upload will fail.
Your spider web host sets these options. Normally, starter hosting plans volition have a lesser upload size limit than enterprise hosting plans. Some hosts may allow you lot to override these limits. Simply in most cases, you lot may need your hosting provider'south help (and perhaps a plan upgrade) to increment them.
Why Increase the Maximum Upload File Size in WordPress?
There are many reasons why you may demand to increment your WordPress site's maximum upload file size. Hither are the most common ones:
- You want to install a large theme or plugin directly through the WordPress admin dashboard.
- Updating your WordPress site regularly is a cracking mode to keep your readers engaged and render for more than. And that includes uploading new images, videos, audios, and other media regularly. Nonetheless, that's not always feasible when there'southward a file size limit for your uploads.
- Y'all want to upload a large video or image every bit your site'southward groundwork or header.
- You programme to sell digital files such equally ebooks, photographs, videos, themes, and plugins directly from your site. Sometimes, these files can run up to hundreds of megabytes (or more).
Now that we've covered the basics of max upload file size in WordPress, permit'due south larn how to increase information technology.
x Ways to Increase the Max Upload File Size in WordPress
There are many means you can fix the WordPress maximum upload size event. We'll start with the easiest ones commencement, and then we'll move on to the intermediate-level tutorials.
Contact Your Hosting Provider for Help
If you're facing issues with uploading files and file size limits, reaching out to your hosting provider for assist is i of the quickest solutions. Increasing the upload limit is a piffling task for tech back up, so most hosting companies tin can help y'all set this result quickly.
Tinkering with your server or site configuration files tin always be a challenge. Hence, we e'er recommend you try this method starting time.
If yous're hosting your site with Kinsta, our knowledgeable support team is simply a click away and available 24/seven. To go started, go to your MyKinsta dashboard and click the chat icon in the bottom right corner.

We take representatives to aid you in many languages, including English, Spanish, French, German, Italian, and Portuguese.
Increment the Max Upload File Size in WordPress Multisite
If you're running a WordPress Multisite network, then you can alter the max upload file size for your network.
First, head to your Network Admin dashboard, and then become to Settings > Network Settings screen. Here, scroll down till you detect the Upload Settings section. You'll find the Max upload file size
field in this surface area.

The default value of Max upload file size in a WordPress Multisite is 1500 KB (~1.5 MB). Yous tin can alter this to a college value and click the Save Changes button.
Note: Yous cannot circumvent the server-level max upload size limit from here. If the limit you set here is college than the server'southward max upload size limit, the server will ignore it. You tin use the methods described above to find your webserver's configuration.

Here, we've set the new max upload file size to 131072 KB (~128 MB).
You can also limit the full size of files uploaded to an individual site in the Multisite network. Even so, it's disabled past default.
Update Your '.htaccess' File
If your webserver runs on Apache, you can update your site's .htaccess file to increase the max upload size in WordPress. You lot can find your .htaccess file in the WordPress site'southward root directory.
As per PHP documentation, 3 PHP directives are responsible for how WordPress handles uploads. They are:
-
upload_max_filesize
-
post_max_size
-
memory_limit
We've already discussed them in the Site Health Info section in a higher place. Information technology would assistance if yous modified these 3 directives' values to admit your file sizes. For instance, if the largest file you lot're planning to upload is 32 MB, we recommend the following settings:
-
upload_max_filesize = 32M
-
post_max_size = 64M
-
memory_limit = 128M
Notice, all the values utilize M instead of MB. That'south how PHP handles its directives.
Uploads tin can contain extra information in addition to the file itself. So, giving all other upload-related directives some breathing space is a good idea. Yous can read our in-depth tutorial on how to better PHP memory limit in WordPress for more information.
Access your .htaccess file via FTP/SFTP or your hosting provider's File Manager.

Open the.htaccess file with a text editor or lawmaking editor, and then add together the following code:
php_value upload_max_filesize 32M php_value post_max_size 64M php_value memory_limit 128M php_value max_execution_time 300 php_value max_input_time 300
You can discover ii other PHP directives in the higher up lawmaking: max_execution_time
and max_input_time
. They ascertain how long a server spends on a unmarried PHP task. The bigger your uploads, the bigger the time spent volition be. You need to set their values to a number that'due south appropriate for your use example.
Note: You may get a 500 Internal Server Error after using the method in a higher place. Most likely, information technology's because your server is running PHP in CGI mode. In such cases, you cannot use the above commands in your .htaccess file.
Create or Modify the 'php.ini' File
The php.ini file is where yous define changes to your default PHP settings. Typically, information technology contains directives that ascertain file timeouts, max upload size, and resource limits.
Using SSH or FTP, you tin find the php.ini file in your WordPress root directory. In some cases, you may not locate information technology there. Fret not! Y'all tin create a new file with the same name in your site's root directory.

With a code or text editor, add the post-obit code to your existing or new php.ini file:
upload_max_filesize = 32M post_max_size = 64M memory_limit = 128M
Don't forget to relieve your file after making the changes. Some hosts don't allow you to alter PHP settings via this method. In such a instance, y'all tin proceed to try the following solution instead.
Subscribe Now
Create or Modify the '.user.ini' File
If your hosting provider has locked down the global PHP settings, they may have configured the server to piece of work with .user.ini files instead of php.ini files.
Like php.ini and .htaccess files, you can find the .user.ini in your site's root directory. If you lot can't find it, then you can create a new .user.ini file in the same location. Follow the aforementioned procedure described in the previous method to create a newphp.ini file.
Next, add the following code to your .user.ini file:
upload_max_filesize = 32M post_max_size = 64M memory_limit = 128M
Y'all'll notice that it'south a repeat of the previous method, except with a different filename.
Modify PHP Options via cPanel
If your hosting provider uses the cPanel dashboard to help y'all manage your server and site configuration, you can change the max upload file size through its interface.
To get started, go to your cPanel dashboard, and select the Select PHP Version under the Software department.

Here, y'all can change your server's current PHP version and enable/disable many PHP extensions. Click on the Options link in the navigation menu to go to the PHP Options panel.

Whorl down here to alter the values of PHP directives such every bit upload_max_filesize
, post_max_size
, memory_limit
, max_execution_time
, and max_input_time
. The max values you can set here depend on your current hosting program.

If you accept whatever doubts about these values, we suggest you contact your hosting provider. The latest cPanel dashboard saves changes automatically, so you don't have to click anything. But if you're using an older cPanel version, make sure to click the Save Changes push button.
Increase the Max Upload File Size in Nginx
Nginx is another webserver like Apache, but it's also a lot more. Typically, Nginx tin can handle more concurrent requests than Apache, making it a lot faster. Kinsta uses Nginx to power its operation-optimized hosting solutions for WordPress.
If yous're running your WordPress site on Nginx, you'll need to modify both your php.ini and nginx.conf files. Nosotros've dealt with the former file before. The latter one is called an Nginx config file.
On an Nginx server, you can find the php.ini file at /etc/php/vii.iv/fpm/php.ini
. Depending on which PHP version you've installed, the verbal path may vary slightly.
upload_max_filesize = 64M post_max_size = 128M
You don't accept to set the memory_limit
in the above file equally Nginx handles information technology differently. For more, you can check out this Stack Overflow thread. After saving your php.ini file, enable the changes by restarting PHP-FPM using the below code in your terminal:
sudo service php7.4-fpm restart
Again, the exact code may vary slightly depending on the PHP version installed on your server.
Side by side, utilize Nginx's client_max_body_size
directive to ready the new max upload size limit. You need to declare this directive in the nginx.conf file, which you can observe at /etc/nginx/nginx.conf
.
You can declare this directive inside the http {...}
block, the server {...}
block, or the location {...}
block.
Setting it in the http block will bear upon all the sites/apps hosted on this server.
http { ... client_max_body_size 128M; }
Defining information technology in the server block will only affect a specific site/app hosted past this server.
server { ... client_max_body_size 128M; }
The location block only affects the specified directory (e.1000. files, uploads) within a site/app.
location /files { ... client_max_body_size 128M; }
Don't forget to salvage the file and restart Nginx to utilize the changes. To do that, you can use the following command in your final:
sudo service nginx reload
If you're a Kinsta client, y'all tin can't access your Nginx config directly. Even so, you can achieve out to our support team, and they tin can quickly make the changes for you.
Utilize the WordPress 'upload_size_limit' Filter
WordPress 2.v introduced the upload_size_limit filter, which filters the maximum upload size allowed in php.ini. Even WordPress uses this filter to show you the max upload size immune, similar in the Media Library and Site Health Info screens.
Beneath is an example of this filter in action from WordPress contributor Drew Jaynes. It defines the upload size limit for all not-admin roles.
/** * Filter the upload size limit for not-administrators. * * @param cord $size Upload size limit (in bytes). * @return int (perhaps) Filtered size limit. */ role filter_site_upload_size_limit( $size ) { // Gear up the upload size limit to x MB for users lacking the 'manage_options' capability. if ( ! current_user_can( 'manage_options' ) ) { // 10 MB. $size = 1024 * 10000; } return $size; } add_filter( 'upload_size_limit', 'filter_site_upload_size_limit', twenty );
The above lawmaking uses WordPress' manage_options
capability to prepare this limit only for non-admins. You tin can alter the code to target specific user roles or user ids. Read our in-depth WordPress roles and capabilities commodity for more information.
Use a WordPress Plugin
Messing with code using SSH or FTP/SFTP is not for anybody. If y'all're not comfortable with writing or editing code, you tin can use a WordPress plugin instead.

We'll be using the WP Maximum Upload File Size plugin here. As of writing this, it's the but upward-to-appointment plugin on the WordPress plugin repository that helps y'all get this washed.
To become started, install and activate the WP Maximum Upload File Size plugin. Next, go to its settings screen in your WordPress dashboard. Hither, you can see the maximum upload file size set by both your hosting provider and WordPress.

Here, you can see that the maximum upload file size set by WordPress is lesser than that gear up past your hosting provider. Hence, yous can crank it up by choosing the Maximum Upload File Size with the dropdown presented.
Note: If you want to set a max upload file size limit that's larger than the ane gear up by your hosting provider, it's non possible to do it via this plugin. For that, you lot need to contact your hosting provider.
Upload Files via FTP/SFTP
Are you still struggling with all the above methods? Or with your hosting provider to have them raise the upload file size limit? You can always upload big files via FTP/SFTP.

If you have a lot of large files to upload, this is the fastest method. You lot can read our in-depth tutorial on how to bulk upload files to the WordPress media library for more information.
Sometimes, WordPress doesn't recognize files uploaded via FTP/SFTP. If that'due south the instance, you lot tin use the free Add From Server plugin to import the uploaded files into WordPress.
Alternatively, you can do the same directly from the command line by importing images using WP-CLI. The wp media import
command allows you to create attachments from local files or URLs.
Don't Edit the 'wp-config.php' File
Editing the wp-config.php file doesn't work anymore. We're calculation it here considering we've establish many web tutorials that listing it every bit a legitimate manner to increase the max upload size in WordPress.
It involves going to your site'south root directory via FTP/SFTP or SSH and then editing the wp-config.php file.

Yous're suggested to add the following code to the wp-config.php file:
@ini_set( 'upload_max_size' , '64M' ); @ini_set( 'post_max_size', '128M'); @ini_set( 'memory_limit', '256M' );
It fails to work because you can only use the ini_set() function to set PHP directives that belong to the PHP_INI_ALL changeable mode.
As upload_max_size
and post_max_size
belong to the PHP_INI_PERDIR changeable mode. You can only ready them via php.ini, .htaccess, http.conf, or .user.ini.
If you've tried this method before without seeing any results, now you know why it fails.
Verify Your WordPress Site'south New Max Upload File Size
Finally, it's time to verify whether the new max upload file size limit is implemented in your WordPress site. To do this, follow the aforementioned procedure we discussed above to cheque the max upload file size in WordPress.
Go to your Media Library in the WordPress dashboard and check whether the max upload file size limit has changed.

Yes, information technology has changed. That's a success!
Y'all tin also become to the Site Health Info console and check for the same nether Media Handling and Server dropdowns.


Summary
As you've seen, increasing the maximum upload file size in WordPress isn't besides complex. Whether you're building a media-heavy portfolio site or installing a large theme, it'southward just a matter of knowing where to expect for and what commands or tools to use.
In most cases, reaching out to your hosting provider should be enough. However, if you lot're stuck with a troublesome host, we've shown yous some culling methods you lot tin attempt before migrating to better hosting.
Go uploading!
Did we cover it all? If yous've experienced a stubborn example of upload file size limits, permit united states of america know how you managed to fix it.
Salve time, costs and maximize site performance with:
- Instant help from WordPress hosting experts, 24/7.
- Cloudflare Enterprise integration.
- Global audience accomplish with 29 information centers worldwide.
- Optimization with our built-in Awarding Performance Monitoring.
All of that and much more than, in one plan with no long-term contracts, assisted migrations, and a xxx-mean solar day-money-dorsum-guarantee. Check out our plans or talk to sales to find the plan that's correct for you.
Source: https://kinsta.com/blog/increase-max-upload-size-wordpress/
0 Response to "How to Upload 500 Mb Video to Wordpress"
Postar um comentário