WordPress Guides

How To Change The Max Upload Size In WordPress

How To Change The Max Upload Size In WordPress

Are you frustrated with the limited maximum upload size in WordPress? Do you want to share larger files or upload high-resolution images without hassle? Look no further! In this comprehensive guide, we will show you how to change the max upload size in WordPress, allowing you to take full control of your website's media capabilities.

Setting a larger maximum upload size in WordPress requires a few technical steps, but don't worry, we'll walk you through it. Follow these steps:

1. Check your current maximum upload size:

To determine your current maximum upload size, login to your WordPress dashboard and navigate to Media > Add New. You will see the maximum upload size limit mentioned below the upload box. Take note of this number.

2. Update the PHP.ini file:

Access your website's root directory using an FTP client or cPanel's file manager. Locate the PHP.ini file, typically found in the root directory or in the folder called "public_html." If you cannot find it, contact your hosting provider for assistance.

Open the PHP.ini file with a text editor, and search for the line that starts with "upload_max_filesize." Change the value to your desired maximum upload size. For example, if you want to change it to 64MB, modify the line to say: "upload_max_filesize = 64M."

Next, find the line that begins with "post_max_size" and update it to match the new maximum upload size. Save the changes, and if necessary, restart your web server.

3. Modify the .htaccess file:

Navigate to your website's root directory once again and locate the .htaccess file. If it doesn't exist, create a new text file and name it ".htaccess" (without quotes). Open it using a text editor.

Add the following lines at the bottom of the .htaccess file:

php_value upload_max_filesize 64M

php_value post_max_size 64M

php_value memory_limit 256M

php_value max_execution_time 300

php_value max_input_time 300

Make sure to update the values according to your desired maximum upload size. Save the changes.

4. Edit the functions.php file:

Access your WordPress theme's folder by going to wp-content > themes > [your theme]. Look for the "functions.php" file and edit it using a text editor.

Add the following line of code at the end of the file:

@ini_set( 'upload_max_size' , '64M' );

Replace '64M' with your desired maximum upload size. Save the changes.

How To Change The Max Upload Size In WordPress Example:

Let's say you want to increase the maximum upload size to 64MB. After following the steps outlined above, you will have successfully changed the max upload size in WordPress, allowing you to upload larger files and media content effortlessly.

Congratulations! You've learned how to change the max upload size in WordPress like a pro. With DamnWoo's expertise in crafting WordPress plugins, you can elevate your online presence and supercharge your success. Explore our other guides on DamnWoo to enhance your website's functionalities. Try one of our awesome plugins today and take your small business or entrepreneurial venture to new heights! Don't forget to share this article with others who may need this valuable information.

author-avatar

About Paul Waring

Paul Waring is a seasoned veteran in the WordPress ecosystem, bringing over 15 years of insightful experience as a Senior WordPress Developer. An aficionado of digital landscapes, Paul's deep-rooted passion for technology has led him to master the art of crafting functional, responsive, and aesthetically pleasing websites. As an early adopter of WordPress, Paul has witnessed and contributed to its exponential growth, helping businesses of various sizes worldwide leverage its vast array of features. His work ranges from developing intricate e-commerce solutions to optimizing site performance and enhancing UX/UI design. His forte lies in integrating progressive solutions that dovetail seamlessly with WordPress, which he is excited to share with the DamnWoo community. Away from the digital world, Paul relishes the physical and mental challenge of rock climbing - a hobby that mirrors his approach to problem-solving in web development. He finds both activities require an optimal blend of strategy, creativity, and determination to surmount seemingly insurmountable problems. Just as he scales rocky edifices, he enjoys tackling complex coding challenges and finding efficient solutions. Paul brings to DamnWoo his rich expertise, diverse experience, and his contagious enthusiasm for WordPress. He aims to demystify the often intricate world of WordPress, making it more accessible and usable for all - whether you're a seasoned developer, a tech-savvy business owner, or a curious beginner in the digital realm.

Related Posts