Maximum File Upload Size In Wordpress
WordPress have so many themes and plugins that allow you to build just about any kind of website. From ecommerce to a simple blog, WordPress has everything for everyone. When a WordPress website that hosts large image files, video or themes with single media file size running into GBs, then you might face a roadblock of not being able to upload media files larger than 2MB (in most cases by default).
By default, the maximum upload size in WordPress ranges from 2MB to 150MB depending on the settings of your web hosting provider is giving by default. To check what is the current max upload size limit in your WordPress site then navigate to WP Admin > Media > Add New. You will see the current max upload size on the bottom.
Looking to increase your maximum file upload size in WordPress? Low file upload limits can cause a your file name exceeds the maximum upload size for this site error and stop you from uploading files in your media library or from installing large-sized plugins and themes.
The most common cause of this error can be attributed to a few PHP settings that can easily be changed in the php.ini, .htaccess file, wp-config.php file, the theme’s functions.php file or with the Increase Max Upload Filesize plugin. This article will walk you through all four solutions.
Edit php.ini FileEdit .htaccess FileEdit wp-config.php or functions.php FilePlugin MethodIncrease Upload Size in MultisiteContact Hosting Provider
Note: The first 3 methods are meant for quick fixing the issues caused by maximum file upload size limits. However, they may not work with some shared hosts. In that case, you’ll need to go for the fourth option, i.e. contacting your hosting provider.
1. Edit php.ini File
This is a default file used to configure any application which runs on PHP. This file contains parameters required for file timeout, upload size, and resource limits. Access your WordPress root directory using SSH or FTP and look for a php.ini file. In some cases, this file is not visible and you might need to enable hidden file instead to view it.
Open any text editor and create a new file. Copy the following code and save it as php.ini.
upload_max_filesize = 500M
post_max_size = 500M
If you are using CPanel, log into CPanel and find the software section and click on “MultiPHP INI Editor”. The file size defined above in the example can be adjusted as per your needs.
2. Edit .htaccess File
If your web server is using Apache and PHP is set as an Apache module, then you can add a few lines of code in your WordPress .htaccess file to increase the max upload size in WordPress. Access your WordPress root directory using SSH or FTP and look for a .htaccess file. In some cases, this file is not visible and you might need to enable hidden file instead to view it.
Open up .htaccess file in a code editor or Notepad and add the following lines.
php_value upload_max_filesize 500M
php_value post_max_size 500M
php_value max_execution_time 360
php_value max_input_time 360
This will define the max upload size in Megabytes. Replace the numbers as per your requirement. The max execution time and max input time are in seconds. The execution time defines the limit of time spent on a single script. Choose a number that is suitable for your site.
3. Edit wp-config.php or functions.php File
Another way of increasing the upload size in WordPress is to define the size parameter in the wp-config.php file. To do that, access your WordPress root directory using SSH or FTP and locate a wp-config.php file. Or you can easily increase the size limits by define the size parameter in the the functions.php file of your theme.
Open the file in any text editor and add the following code.
@ini_set( 'upload_max_size' , '500M' );
@ini_set( 'post_max_size', '500M');
Save your changes and it should increase your file upload size.
4. Plugin Method
Not everyone is keen to do some coding or accessing root files using SSH or FTP. Alternatively, the plugin comes in handy and luckily there is a WordPress plugin available for increasing WordPress upload size. The plugin we will be using is the Increase Max Upload Filesize plugin.
Go to your WordPress Dashboard > Plugins > Add new, search “Increase Max Upload Filesize” then activate and install the plugin. Once installed, go to plugin settings and simply enter the value for upload size.
Click the Save Changes button to apply the new upload size.
5. Increase Upload Size in Multisite
If you are running WordPress multisite, then upload size can be increased from settings. This increase is dependent on your server settings. If your server is set to 20MB you cannot increase WordPress upload size to 25MB. However, if your server is set to 20MB your network setting is set to 15 MB then you can resolve the issue by increasing the upload size to 20MB.
Begin by logging into your WordPress Multisite network. Be sure that your user has access to change network-wide settings.On the top left corner of the page, hover over My Sites > Network Admin > Settings.You’re now inside your “Network Settings” page. On this page, scroll down to the Upload Settings section.Locate the “Max upload file size” setting. Inside this setting, you can increase the maximum file size.Finally, be sure to click the Save Changes button to save your settings.
7. Contact Your Hosting Provider
If you do not want to edit the files yourself then you can always contact your hosting provider to do it for you.
If you are using our managed WordPress hosting, then you can easily increase the max upload size limits of all your websites through the options in our platform. It is only a matter of a few clicks, if you are not familiar then just tell us and we will help you.
Conclusion
Above are some ways for you to increase the maximum file upload size in WordPress. If you are not able to find an answer to any of your issues pertaining to WordPress, then you can always go and ask for help in the WordPress community. I am also a part of the community, so you can always reach out to me as well.
The post Maximum File Upload Size in WordPress appeared first on Wordpress Tip Guide Support Solution.
Artikel ini hanyalah simpanan cache dari url asal penulis yang berkebarangkalian sudah terlalu lama atau sudah dibuang :
https://www.jonloh.com/maximum-file-upload-size-in-wordpress/