WordPress is a powerhouse with many themes and plugins that allow you to build almost any website, be it an ecommerce store or a corporate network. However, when choosing WordPress hosting, you should consider performance, security, and support in the first place.
If you are building a WordPress website that hosts a portfolio with large image files or a video hosting site with a single media file size running into GBs, then you might face a roadblock of not being able to upload media files larger than 25MB (in most cases).
In this article, you will learn the maximum upload size for WordPress and how you can check and increase it with the best methods.
What Is the Maximum Upload Size for WordPress?
When building a website, you must upload different media files like images, videos, themes, plugins, etc. And uploading large files can be a hurdle if the upload file size is set to the minimum. Generally, the maximum upload size in WordPress ranges from 2MB to 150MB, depending on your web hosting settings. Your hosting provider usually sets this limit at the server level to prevent timeouts. The default upload file size on Cloudways is 10MB.
How to Check the Current Maximum Upload Size in WordPress?
To check your WordPress site’s current max upload size limit, navigate to WP Admin → Media → Add New. You will see the current max upload size on the bottom, as shown in the screenshot.
If the current max upload size limit meets your demand, you can leave it as it is. However, if it doesn’t, don’t fret; there are many ways you can increase the max upload size in WordPress.
How to Increase Media File Maximum Upload Size in WordPress?
These are the best methods for increasing WordPress’s maximum upload size of media files.
- Update .htaccess File
- Edit functions.php File
- Create or Edit php.ini File
- Increase Upload Size in Multisite
- Modify wp-config.php File
- Using Plugin Method
- Contact Hosting Provider
Increasing Your WordPress Maximum Upload File Size Is Easier With Cloudways
Whether you’re a beginner or an expert, Cloudways Platform is based on UI, where you can make changes in a few seconds.
1. Update .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.
To access your .htaccess file, connect to your server via FTP client and navigate to the folder where WordPress is installed. To connect your server via FTP Client like FileZilla, you need the following values:
- Host
- Username
- Password
- Port
Open up the .htaccess file in a code editor or Notepad and add the following 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 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.
WordPress Core Updates Made Easy Via SafeUpdates
Automate your site’s core, plugin, and theme updates via SafeUpdates on Cloudways for as low as $2 a month.
2. Edit functions.php File
Sometimes, you might be unable to access your .htaccess file or be more 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. To access your functions.php file, go to WordPress Dashboard → Appearance → Theme File Editor and select Theme Functions file.
However, remember if you change the theme, the max upload size will return to its default values until you edit the functions.php file of the new theme, as the following code is added to only your current theme.
@ini_set( 'upload_max_size' , '64M' ); @ini_set( 'post_max_size', '64M'); @ini_set( 'max_execution_time', '300' );
3. Create or 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; the other option would be to create a new file instead.
Open any text editor and create a new file on your desktop. Copy the following code and save it as php.ini.
upload_max_filesize = 64M post_max_size = 128M memory_limit = 264M
If you create a new PHP.ini file, then upload it using SSH or FTP inside the same root folder.
4. 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 the WordPress upload size to 25MB. However, if your server is set to 20MB and your network setting is set to 15 MB, you can resolve the issue by increasing the upload size to 20MB.
5. Modify wp-config.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.
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. Using 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 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 Install and Activate 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.
7. Contact Your Hosting Provider
If you do not want to edit the files, you can always contact your hosting provider to do it for you.
Managed WordPress Hosting Starting From $11/Month
Experience Faster WordPress Themes’ Performance & Constant Availability on Cloudways.
If you are using Cloudways WordPress managed hosting, you can easily increase the max upload size limits of all your websites on a single server through the options in the platform. It is only a matter of a few clicks, and if you are not using Cloudways, you can request a Cloudways demo to tell us your hosting challenges. Hosting plans for Cloudways involve PHP hosting & top providers AWS, Google Compute Engine, and DigitalOcean. With various 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.
Summary
This article provides all possible solutions to increase the maximum file upload size in WordPress. However, some methods may not work on the majority of web hosts. If in case, the above methods do not work with you, the best thing to do is contact your hosting provider. Another option is simply to reduce the size or change the type of the original file – you can use the mxf converter for this. If you know any other methods that I’ve missed, please let me know in the comments.
Scale Seamlessly with Cloudways Autonomous
Bid farewell to traffic worries. Cloudways Autonomous effortlessly handles your website’s growth, ensuring smooth operations no matter the surge.
Q. How can I increase the maximum upload size through the hosting provider?
A) Most hosting providers usually give an option in the server configuration for increasing the maximum upload file size in WordPress. You can read the knowledge base of your hosting provider; if you don’t get the answer, contact your hosting support.
Q. Can increasing maximum upload size have an effect on site load speed?
A) This operation belongs to backend settings, but it can affect your site speed if your upload file is not optimized properly. It’s better if you ensure that apart from choosing the fastest WordPress servers, whatever file you upload is optimized and does not make it hard for your users and search engine crawlers to load.
Q. How to increase the upload size in WordPress?
A) You can increase the upload size in WordPress by editing the php.ini file, modifying the .htaccess file, or adding custom code to the wp-config.php file. Alternatively, you can ask your hosting provider to adjust the server settings for you.
Q. How do I increase the maximum page size in WordPress?
A) To increase the maximum page size, adjust your server’s post_max_size and upload_max_filesize settings in the php.ini file. Ensure the values are set higher than your required upload size to accommodate larger pages or files.
Q. How do I increase the max upload file size in WordPress multisite?
A) For WordPress Multisite, go to Network Admin > Settings, and update the “Max upload file size” setting. You may also need to modify the php.ini file or use the .htaccess method to ensure server-side limits are increased.
Q. How to increase maximum upload file size in WordPress cPanel?
A) Log in to cPanel, go to Select PHP Version > Options, and increase the values for upload_max_filesize, post_max_size, and memory_limit.
Similarly, you can also use the File Manager to edit the .htaccess or php.ini file directly.
Inshal Ali
Inshal is a Content Marketer at Cloudways. With background in computer science, skill of content and a whole lot of creativity, he helps business reach the sky and go beyond through content that speaks the language of their customers. Apart from work, you will see him mostly in some online games or on a football field.