Where to Set Max Upload Size Wordpress
WordPress is a powerhouse with so many themes and plugins that allow you to build just about any kind of website. From ecommerce to a simple blog, WordPress has you covered. Yet, when choosing a web hosting for WordPress, you should consider performance, security, and support in the first identify.
If yous are building a WordPress website that hosts a portfolio with large prototype files or a video hosting site with a unmarried media file size running into GBs, then you lot might face up a roadblock of not beingness able to upload media files larger than 25MB (in virtually cases).
500 Internal Server fault ever seems to come at the most untimely manner and users suddenly go to find how to become a WordPress website online.
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.
Managed WordPress Hosting Starting from $10/calendar month.
Guaranteed comeback in Core Web Vitals scores. 3-solar day gratuitous trial.
To check what is the current max upload size limit in your WordPress site then navigate to WP Admin → Media → Add New. Yous volition see the current max upload size on the bottom as shown in the screenshot.
If the current max upload size limit meets your need then y'all can leave it every bit it is. However, if it doesn't and so don't fret, at that place are many ways you can increase the max upload size in WordPress. I am going to highlight the following ways in this tutorial.
- Update .htaccess File
- Edit Functions.php File
- php.ini Option
- Increase Upload Size in Multisite
- wp-config.php File
- Plugin Method
- Contact Hosting Provider
Note: This guide is written to provide all possible solutions. Nevertheless, some may not work on the majority of the web hosts. In this case, the all-time solution is to contact your hosting provider.
1. Update .htaccess file
If your web server is using Apache and PHP is set every bit an Apache module, and so yous tin add a few lines of lawmaking in your WordPress .htaccess file to increase the max upload size in WordPress.
To access your .htaccess file, connect to your server via FTP customer and navigate to the folder where WordPress is installed. Open up .htaccess file in a code editor or Notepad and add the post-obit lines.
php_value upload_max_filesize 64M php_value post_max_size 128M php_value memory_limit 256M php_value max_execution_time 300 php_value max_input_time 300
This will define the max upload size in Megabytes. Replace the numbers equally per your requirement. The max execution fourth dimension and max input fourth dimension are in seconds. The execution time defines the limit of time spent on a single script. Cull a number that is suitable for your site.
2. Edit Functions.php File
In some cases, yous might not exist able to admission your .htaccess file or you are more than comfortable editing WordPress theme files.
You can easily increase the size limits by adding the following lines of code in the functions.php file of your theme.
However, remember if you modify the theme then max upload size will return to its default values until you edit the functions.php file of the new theme.
@ini_set( 'upload_max_size' , '64M' ); @ini_set( 'post_max_size', '64M'); @ini_set( 'max_execution_time', '300' );
3. php.ini Option
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 to the other choice would be to create a new file instead.
Open up any text editor and create a new file. Re-create the following code and save it equally php.ini.
upload_max_filesize = 25M post_max_size = 13M memory_limit = 15M
Now, upload that php.ini file using SSH or FTP within the same root folder.
4. Increase Upload Size in Multisite
If you are running WordPress multisite, then upload size tin can exist 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 xv MB then you can resolve the consequence by increasing the upload size to 20MB.
5. wp-config.php File
Another style 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.
Open the file in any text editor and add the following code.
@ini_set( 'upload_max_size' , '20M' ); @ini_set( 'post_max_size', '13M'); @ini_set( 'memory_limit', '15M' );
Save your changes and it should increase your file upload size.
6. Plugin Method
Not everyone is a fan of writing code or accessing root files using SSH or FTP. For that situation, the plugin comes in handy and luckily at that place 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 theSave Changes button to apply the new upload size.
7. Contact Your Hosting Provider
If you do not want to edit the files yourself then you lot can always contact your hosting provider to do it for you.
If you lot are using Cloudways WordPress managed hosting, so you tin can hands increase the max upload size limits of all your websites on a unmarried server through the options in the platform. It is simply a matter of a few clicks and if yous are not using Cloudways then y'all can request a Cloudways demo to Tell us your hosting challenges. Hosting plans for Cloudways involve top providers AWS, Google Compute Engine, Vultr, Linode and DigitalOcean. With such a variety of options, no challenge is too big to overcome.
To edit the upload size limit, log in to your Cloudways account navigate to Server under the Server Settings & Packages edit the Upload Size field as shown in the screenshot. Don't forget to click on Save Changes at the bottom of the screen.
Determination
WordPress is a versatile CMS. There is ever a way to practice something. If you are non able to observe an respond to any of your issues pertaining to WordPress, and then you can always get and inquire in the e'er helping the WordPress community. I am also a part of that awesome community, and so yous tin can always reach out to me every bit well.
Share your opinion in the comment section. COMMENT NOW
Share This Article
Client Review at
"Beautifully optimized hosting for WordPress and Magento"
Arda Burak [Agency Owner]
Ahsan Parwez
Ahsan is the Community Team Managing director at Cloudways - A Managed Cloud Hosting Platform. He loves to solve problems and help Cloudways' clients in whatsoever aspect he tin. In his free time, you tin find him playing RTS PC games.
Source: https://www.cloudways.com/blog/increase-media-file-maximum-upload-size-in-wordpress/
0 Response to "Where to Set Max Upload Size Wordpress"
Post a Comment