The WordPress website is a commonly inspected website for company owners or entrepreneurs. However, when the user tries to upload the file, it displays a message “the uploaded file exceeds the upload_max_filesize directive in php.ini.” The website detects this issue only while uploading something on the site.
After analyzing different obstacles, it is evident that this issue occurs while sharing large-sized files. These files could include anything along the lines of images, videos, plugins, themes, and many more. These anomalies annoy the users and do not let them use their website efficiently.
Sometimes, there is a probability that the user may receive the warning without being at any fault. However, the chances to be in such a position are notably rare. Besides, you can find the most reliable solutions to your concerns in this article.
What Causes the Uploaded File Exceeds the Upload_max_filesize Directive in php.ini?
Many experts say that the file size upload error occurs due to a broad range of reasons. Most of the users refresh their websites repeatedly so that the site can run perfectly. But, it does not help them do their best. The problem lies in the settings of WordPress and not in the system.
Firstly, it is common for the hosting provider to put some limitations on their users. These limitations do not allow the users to perform some of the activities on their systems. Secondly, there is some issue with the upload max filesize present in the php.ini directive. Whenever any user tries to upload a file exceeding the limit, they get a message flashed on their screen.
This message warns them that the file they want to upload is larger than the permissible limit. In return, the user can not upload the directives. Undoubtedly, it causes a massive problem for the people. Although, WordPress allows you to edit these folders by using some of their properties. These properties are available below.
Read Also:
How to Fix the Uploaded File Exceeds the Upload_max_filesize Directive in php.ini
In case the users want to resolve the error mentioned in the query, they have to increase the file size upload limit. It means that the users can talk to their hosting service support. Also, they need to improve the values of the upload max filesize directive in the php.ini file. Well, various achievable procedures can fix the file exceed failure in your system. Some of them are listed here.
1. Talk to your host’s support
In the first method, the users need to contact their hosting service support to solve the issue. Well, it is common for the hosting provider to put some limitations on their users. It means that you will not be able to perform certain activities on your system. The user can ask their hosting service provider to alter the limitations put on their system to undo the effect.
It is entirely effortless for the service provider to modify their settings according to their clients. One can not deny the fact that it is essential to contact the service provider support system.
2. Edit php.ini via cPanel
One of the advantages of the host using the cPanel is that it allows the users to edit their files. The users can modify their php.ini file and upload max filesize directive using the cPanel dashboard. You can follow subsequent steps for more information about editing the php.ini file using cPanel.
Step 1: Firstly, the user needs to search the MultiPHP INI Editor.
Step 2: Now, a drop-down menu will appear, and the user needs to select their WordPress website.
Step 3: It will permit the users to adjust the upload_max_filesize directive for the expected website.
Step 4: Lastly, the user needs to navigate the right side of the screen and increase the value according to your necessities.
3. Create or edit php.ini via FTP
If the previous solution does not serve you, and the issue still flashes. Then to solve the problem, you should try to edit the php.ini file through FTP. The reason being that the current hosting restrictions will not allow you to access the php.ini files. Therefore, the primary thing to check is whether the user can access the php.ini file. Follow these consequent steps as they can support you in achieving the desired goal.
Step 1: Firstly, connect to your respective server using the FTP.
Step 2: Now, the user needs to navigate to the root folder of the website.
Step 3: Now, search for the file named php.ini in the selected folder. If there is no such file, the user needs to create a new file with the php.ini title.
Step 4: It will allow the users to edit the file directly with no hassle.
Step 5: Operate these commands furthermore hit enter button.
- upload_max_filesize = 12M
- post_max_size = 13M
- memory_limit = 15M
Step 6: After selecting the required file, the users can either paste or modify the code numbers according to their needs. The values of the code are present above.
Step 7: In some cases, the change mentioned above does not work for the users. In such cases, they may need to add a suPHP directive in their website’s access file.
Step 8: To perform step 7, the user needs to edit the .htaccess file using PHP and type the commands on the top of the file.
- <IfModule mod_suphp.c>
- suPHP_ConfigPath /home/username/public_html
- </IfModule>
Note: Replace the username with the file path used.
4. Increase upload_max_filesize Value by Editing .htaccess
At several times, it is not feasible to instantly alter the php.ini files. You can try the subsequent fixes. In case any of the preceding techniques do not run for you.
Step 1: Firstly, connect to your respective server using the FTP.
Step 2: Now, the user needs to navigate to the root folder of the website.
Step 3: Now, search for the file named .htaccess in the selected folder.
Step 4: It will allow the users to edit the file directly with no hassle.
Step 5: Operate these commands furthermore hit enter button.
- php_value upload_max_filesize 12M
- php_value post_max_size 13M
- php_value memory_limit 15M
Step 6: Unfortunately, after implementing the code, many people get the error of internal error displayed on their screen.
Step 7: It means that they can not access the .htaccess file by using these commands.
Step 8: Lastly, such users should delete the commands mentioned above. And check if the website starts functioning again.
Read Also:
Conclusion
If you want to test the working of these methods, you need to go to the media. Now, click on the add new option present in the WordPress dashboard. Here, you can verify whether the numbers you changed in the php.ini file match or not. It means that finally, the users can upload the faulty files here.
In the light of the above, every user should try these solutions to troubleshoot their concerns. Besides the above, these solutions are most dependable, and one can not see any difficulty in trying them. The only condition is that understand all the methods precisely for the most advantageous consequences. And what’s more, all the explications are not suitable for everyone, so find the solution to your benefit.
Leave a Reply