How to Fix " The Uploaded File Exceeds the upload_max_filesize Directive in php.ini " in WordPress

Опубликовано: 04 Октябрь 2024
на канале: WP Wiki - Digital Web Tutor
510
6

Today we're diving into a common issue many WordPress users encounter—' the uploaded file exceeds the upload max filesize directive in php.ini'.

This error typically pops up when you're trying to upload large files, like themes, plugins, or media, but your server's php settings are preventing it. But don't worry! In this tutorial, I will show you a few simple ways to increase your upload limit so you can get back to building your website without any hassle.

Code Snippets: Find the necessary code snippets mentioned in this video in the description below.

For php.ini
upload_max_filesize = 256M
post_max_size = 256M
max_execution_time = 3000

For .htaccess
php_value upload_max_filesize 256M
php_value post_max_size 256M
php_value max_execution_time 300
php_value max_input_time 300

📥 Leave a Comment: If you're still facing issues after following these steps, feel free to drop a comment, and I'll assist you with an alternative solution.

⏩ 100 GB , 100 Website @2.99$ - https://rebrand.ly/wp/hostinger (10% Discount Coupon: WPWIKI)

⏩ Get the Best Domain Hosting Offer: https://rebrand.ly/ref/spaceship (Cheapest on the planet 😱😱😱 )

First of all, we have to log in to cpanel.

Then search, "MultiPHP INI editor".

Here we need to work on two places. The "Post max size" & "Upload max file size".

We have to increase both.

Input a higher size as you need.

And make sure that, the post max size is higher than the upload max file size.

This is already higher, that's why I am not editing.

Now click on "Apply" to save.

Let's recheck the issue.

I am uploading a plugin to check.

The plugin was uploaded successfully. That means the problem is solved.

You can also check the upload size limit in the "Add new media" section.

If anyhow this doesn't solve your problem. Then go to file manager from cpanel.

Go to your website directory.

And find, "php.ini".

If this code exists, then modify these two. Then save them.

If there is no code like these, then paste these codes. Codes are given in the description.

If you don't find any "php.ini" file, then create one.

It is enough for most of the websites.

If you still face the problem, the final solution is, editing htaccess.

At first, go to the settings and show hidden files.

My website already has these codes, it's set to a good upload size. You can modify them as you need.

If you don't see these codes, then paste these given codes under this line.

It will be solved. If still the issue remains, feel free to ask me in the comment section. I will give you another solution.

So, this is the video on how to solve the 'the uploaded file exceeds the upload max filesize directive in php.Ini'. Please like & subscribe.


00:09 - Why did this error occur?
00:30 - Logging into cPanel
00:36 - Using MultiPHP INI Editor
01:38 - Checking Upload Size Limit in Media
01:48 - Editing php.ini via File Manager
02:26 - Creating a php.ini File (If Needed)
02:53 - Editing .htaccess as a Final Solution

👍 Don't forget to like, subscribe, and hit the bell icon for more WordPress tutorials and tips!
~~~~~

⏩ SpeedUp Your WordPress Website By One Plugin: https://rebrand.ly/get/wprocket

For any Business: [email protected]