While uploading files to a WordPress website may seem like a simple task, it can become complicated if the site contains a lot of large media files, such as images, videos, and plugins. Media-heavy websites, including photography sites, design portfolios, and eCommerce stores, often require large files to cater to their audience’s demands. However, uploading such files could be problematic if the maximum upload size set for the site is too low. When the maximum upload size is exceeded, an upload error occurs, and the file will not be uploaded successfully. Therefore, it is recommended to increase the maximum upload size for sites with numerous large media files to prevent upload errors and ensure the proper display of larger files.
Why Increase Maximum Upload Size in WordPress?
Increasing the maximum file size for media uploaded to your WordPress site can be essential for several reasons. First, it allows for the successful upload of large files, such as high-resolution images, custom themes, important plugins, and video files.
Note: WP Engine does not recommend hosting videos directly from your WordPress site. Instead, we provide customers with a CDN that offloads large video files to keep sites running lighting fast.
Moreover, eCommerce sites frequently require an increased maximum upload size to improve product listing and presentation, regardless of whether the products are physical or digital. For physical products, retailers achieve better sales success with multiple high-quality images accompanying listings and product descriptions.
For digital products, such as ebooks or online courses, a larger maximum file size in WordPress provides the opportunity to store all the essential content in one place.
Furthermore, increasing the maximum file size on WordPress allows for more frequent content refresh, which can drive more traffic to your site. Therefore, a larger maximum file size can be highly beneficial for marketers and site owners seeking to expand their audience.
What is the Maximum Upload Size for WordPress?
The maximum file upload size for WordPress can vary between 2 MB and 500 MB, depending on the website hosting provider used.
The maximum upload size of a website is determined by the hosting provider, such as WP Engine, which has a default maximum upload file size of 50 MB (or 1 MB for multisite networks).
Updating the .htaccess file is another option for increasing the maximum upload size in WordPress, but it requires coding skills. The .htaccess file controls the high-level configuration settings for your website, and a simple modification can increase the max upload size. To begin, connect to your web server using an FTP client or cPanel file manager and locate the .htaccess file, usually found in the root directory of your WordPress installation. If you don’t see the file, make sure that hidden files are displayed in your FTP client or file manager. Download a copy of the .htaccess file as a backup and open it with a text editor such as Notepad or TextEdit. Then add the following lines at the bottom of the file:
php_value upload_max_filesize 256M
php_value post_max_size 256M
php_value max_execution_time 300
php_value max_input_time 300
Note that the size is measured in M instead of MB because that’s how PHP handles all directives. Once you’ve made the changes, save the file and upload it back to your web server, overwriting the original .htaccess file. If you receive an error message, it’s likely a 500 Internal Server Error, which means you’re unable to change your max upload size due to your server settings. We recommend making modifications to your website in a staging or development environment rather than in live production.
Edit the functions.php file
Another method to increase the maximum upload size for your site is by editing the functions.php file in your site’s theme. To do this, locate the functions.php file (typically found in the root directory), and download a backup copy.
Then, open the file using a text editor and add the following code snippet at the end of the file:
@ini_set( ‘upload_max_size’ , ‘256M’ ); @ini_set( ‘post_max_size’, ‘256M’); @ini_set( ‘max_execution_time’, ‘300’ );
Similar to the .htaccess file method, save the file once you’re done editing and upload it to your web server, overwriting the original functions.php file.
Steps to Increase Maximum Upload Size in WordPress Multisite Network
If you are managing a WordPress Multisite network, you have the ability to increase the maximum upload size across your entire network.
To start, navigate to your Network Admin dashboard and select the Settings tab. From there, click on Network Settings and locate the Max Upload File Size field.
You can increase your maximum upload size by changing the value in this field to a higher amount and saving your changes. Keep in mind that this action will not bypass your server’s maximum upload limit. If the value you entered exceeds the server’s limit, you will need to contact your hosting provider or try one of the other methods mentioned earlier.