Skip to content
How to Increase the Maximum Upload File Size in WordPress
WEBSITE DESIGN & DEVELOPMENT

How to Increase the Maximum Upload File Size in WordPress.

## How to Increase the Maximum Upload File Size in WordPress. WordPress's built-in media players provide a powerful platform for video and audio streaming. However, if your WordPress installation has a restrictive file upload limit…

TO CONTENT

## How to Increase the Maximum Upload File Size in WordPress. WordPress's built-in media players provide a powerful platform for video and audio streaming. However, if your WordPress installation has a restrictive file upload limit…

How to Increase the Maximum Upload File Size in WordPress — post content

How to Increase the Maximum Upload File Size in WordPress?
## How to Increase the Maximum Upload File Size in WordPress? WordPress's built-in media players offer a powerful platform for video and audio streaming. However, the file upload limit on your WordPress installation can be restrictive. By default, upload limits range from 2MB to 128MB, depending on your server configuration. If your upload limit is low, here is how you can raise this limit so that you can upload larger media files. ### Check Your Current Upload Limit To check your current upload limit, go to **Media -> Add New** in your WordPress dashboard. You will see "Maximum upload file size" below the upload box. This number indicates the maximum size of files you can upload. ### Create a PHP Info File First, it can be useful to learn how PHP is configured. You can use a simple function to see PHP's configuration details. Open a text editor and add the following code: ```php <?php phpinfo(); ?> ``` Name this file "info.php" and upload it to the root directory of your server via FTP. Then go to "http://yoursite.com/info.php" in your browser to view your PHP configuration details. The most important thing to pay attention to here is your PHP version (for example, "PHP Version 5.4.16"). Also, the three settings related to your upload limit are: - `memory_limit` – The amount of memory allocated to PHP. - `post_max_size` – The maximum size that can be processed with a POST request. - `upload_max_filesize` – The maximum size for file uploads. Make sure these values are compatible with your new upload limit. ### Editing the PHP.ini File The best way to increase your upload limit is to edit your server's php.ini file. To find the php.ini file, go to the folder containing your WordPress installation via FTP. It is usually found in the "html" or "www" folder. When you find the php.ini file, take a backup, then open it with a text editor. Add the following values to the php.ini file or update the existing values: ```ini memory_limit = 64M upload_max_filesize = 64M post_max_size = 64M max_execution_time = 300 ``` After making these changes, save the file and re-upload it. The server may need to be restarted. You can check whether the changes are effective from the **Media -> Add New** section. ### Upload Your Own PHP.ini File If you cannot find the php.ini file or do not have access, you can try uploading your own php.ini file. Create a new file and add the following code: ```ini memory_limit = 64M upload_max_filesize = 64M post_max_size = 64M file_uploads = On max_execution_time = 300 ``` Depending on your PHP version, save the file as "php.ini" or "php5.ini". Upload this file to your WordPress installation directory via FTP and clear your browser cache. ### Using the .user.ini File If you are using PHP 5, the `.user.ini` file may also be an option. Create a new file and add the following code inside: ```ini upload_max_filesize = 64M post_max_size = 64M memory_limit = 64M max_execution_time = 300 ``` Upload this file to your WordPress installation directory and check whether the changes have taken effect. ### Trying the .htaccess File If the php.ini methods don't work, you can edit the `.htaccess` file. Open the `.htaccess` file in your WordPress installation directory and add the following code: ```apache php_value upload_max_filesize 64M php_value post_max_size 64M php_value max_execution_time 300 php_value max_input_time 300 ``` Check your site after the changes. If you get any errors, restore the `.htaccess` file you backed up. ### WordPress Config File As a last resort, you can edit your WordPress files directly. Add the following line to the `wp-config.php` file: ```php define('WP_MEMORY_LIMIT', '64M'); ``` You can also add the following code to the `functions.php` file: ```php @ini_set('upload_max_size', '64M'); @ini_set('post_max_size', '64M'); @ini_set('max_execution_time', '300'); ``` ### Contacting Your Web Hosting Provider If the above methods do not work, contact your web hosting provider and ask them to increase the values of "memory_limit", "upload_max_size", and "post_max_size" in your php.ini file. Most providers will gladly accommodate this request. ### Increasing the Upload Limit on MAMP and WAMP - **MAMP (For Mac Users):** Check your PHP information on MAMP's main screen and edit the appropriate php.ini file. - **WAMP (For Windows Users):** Find the `php.ini` file in the WAMP folder and make the necessary changes. ### Conclusion Increasing your upload limit can sometimes be complicated, but one of the methods above will definitely work for you. If you are still having issues, consider getting good web host support. These adjustments are important so that you can fully benefit from WordPress's media-rich capabilities.
Author
· Ad agency owner
Helping brands enter the digital age since 2010.
About →
— Related posts
— Quick contact

Leave your name, we'll call you.

Questions about this post or a short call about your project. Leave your phone and I'll call you at a convenient time. Free consultation.

International numbers welcome
Response time: 2 hours · Mon-Fri 09:00-19:00 GMT+3 · Free consultation
📞
2 hours