Wednesday, September 18, 2024

Top 5 Popular Articles

Infinity Domain Hosting

Related TOPICS

ARCHIVES

How to Increase Maximum Upload File Size In WordPress

I am going to show you how you can increase the maximum upload file size in WordPress. Usually, the maximum upload file size is set to 8MB. It simply means that you can only upload files to my WordPress website up to 8MB and if I upload files larger than the mentioned size then you going to get an error. So how can we fix this and how we can increase this value so that we can upload larger files onto our WordPress website. I’m going to cover all this in this article so make sure you follow the article till the end.

I’m going to share with you the 3 best methods but the first one is going to be the most effective and this is the method which always works for me and I can say that this is going to work for most people. So let’s start this tutorial.

HOW TO INCREASE MAXIMUM UPLOAD FILE SIZE IN WORDPRESS

[lwptoc]

 

You have to login inside the CPanel of your website using the username and password, which is provided by your web hosting provider. And once in the Cpanel dashboard, you have to find out ‘file manager’. You can type file manager else you can scroll down and find “file manager”, click on this. After getting inside the “file manager” you have to get inside public_html.

After getting into public_html, you have to find out where you have installed WordPress. Usually, it’s installed directly inside public_html. Now you have to locate the “wp_admin” folder. Get inside this folder by double-clicking on it. And find out a file “PHP.ini” okay!  In case you can see the “php.ini” you have to create a new one. So go ahead to create a new file and name this “PHP.ini” without the quotes of course and if you refresh or reload the page you will now see “PHP.ini”.

1)     EDIT PHP.INI FILE

Then you have to click on edit and then you have to copy and paste this value inside the “PHP.ini” file okay!

 

upload_max_filesize = 128M

post_max_size = 128M

max_execution_time = 3000

 

This is recommended because these are the three lines and this one especially is important and this will get you away from other errors which are basically memory or time-related errors. Then click on Save Changes and observe what will happen when you try to upload now.  It should now show  128MB. This simply means that you can upload files up to 128MB and if you want to make these values much larger than you can simply type change to any value you want.

But one more thing I want to mention here when you are changing these values keep the upload_max_filesize and post_max_size the same. Ideally, the post_max_size value should be larger than or equal to upload_max_filesize. So it’s 128M we are going to leave it there.

This method is going to work for almost everyone but for the sake of this tutorial let’s see another method because sometimes this sometimes may not work for other users, and they need to find out another way to tackle this issue.

2)     MODIFY THE FUNCTIONS FILE

 

Now the second method is by adding some code to the theme functions file. From your WordPress Dashboard >>Appearance >>Theme  editor.

After getting inside the editor you will find the theme functions.php file. So click on this functions.php you will get. So scroll to the end then press Enter key once again press Enter key and then paste the following codes (you can set the “Maximum Upload File Size” to any value);

@ini_set( ‘max_execution_time’, ‘3000’ );

@ini_set( ‘upload_max_filesize’ , ‘128M’ );

@ini_set( ‘post_max_size’, ‘128M’);

@ini_set( ‘memory_limit’, ‘128M’);

Make sure you are not making any mistakes you are taking care of existing spaces okay! And simply copy this and add the codes at the bottom. Click update file.

 

Maximum Upload File Size

 

3)     .HTACCESS METHOD

If both of the above methods don’t work for you. Then you can still get the same outcome by editing the .htaccess file! For that once again you have to get inside the CPanel of your website. So once again get inside file manager and you have to click on settings and then you have to click show hidden files. So once you have done this now get inside public_html.  After getting inside public_html you can find this file .htaccess file So we are going to edit this file simply click on this click on edit once again click edit and press Enter key. Copy and paste the following lines of code.

php_value upload_max_filesize  128M

php_value post_max_size 128M

php_value max_execution_time 3000

php_value max_input_time 3000

 

Save changes and see if this works for you or not.

So that’s it, folks, I hope you found the article helpful, please check our knowledgebase for more articles on How to install WordPress on your website or local machine.

Thanks and be blessed!!!!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Recent Articles