Creating a website is not only easy to do but recommended if you desire to have a successful competitive business. Using a WordPress website is one of the best ways to do this. Simply select a WordPress Hosting package from Hosting.uk. WordPress is a great foundation to start building your online presence. While you work on creating a masterpiece you should use pictures, videos, and other graphical contents to give your website an added boost to reel in viewers’ attention.
Be mindful though, as while you are using the various files you may get the errors. A common message “the uploaded file exceeds the upload_max_filesize directive in php.ini” occurs in WordPress whenever files are too large. We’ll explore the best ways to resolve this error in PHP.
Table of Contents
Upload Max File Size Explained
When you upload videos or pictures that exceed the set limit, that’s when you receive the error message “the uploaded file exceeds the upload_max_filesize”. The natural response to this message is to simply downgrade the size and quality of the images. However, there are ways to increase your data capacity so you can upload high-quality graphical contents.
In fact, the quality of your pictures and videos are controlled by the level of resources web hosting platforms allot you. To conserve your server’s resources, web hosting platforms establish a limit on the maximum file size that users uploaded.
What is PHP?
WordPress is one of the most popular Content Management Systems (CMS) platforms written using PHP (Hypertext Pre-processor). PHP is an Open Source programming and scripting language designed to create dynamic interactive websites.
Whenever a user requests a web page that has PHP code, the PHP unit installed on that web server processes the code. This then generates Hyper Text Markup Language (HTML) output as a display on your browser screen. HTML is the foundation of websites. Similarly, pictures and videos and other graphical images are the life of exciting sites.
A vast majority of people are visual learners and as such, they find an imageless website to be boring even if it has a lovely design. Images have the ability to trigger a ray of emotions and memories. This makes visitors very engaging. Also, images can cross barriers a lot better than text can.
How to fix the Upload Max File Size in PHP?
How do you troubleshoot the uploaded file exceeds the upload_max_filesize in php.ini? There are several different ways you can do this. The exact method you choose depends on your preference and your host’s configuration. Still, we’ll provide four quick and easy options to learn.
Four practical solutions to resolve file size are:
1. Upgrading your file size
Well, to fix this kind of error, the most obvious solution which is to increase your file size upload limit. Which means increasing the value of the upload_max_filesize directive within your php.ini file. You do this by contacting your hosting provider. Then requesting that they increase your limit. Your webhosting service provider can do this in a matter of minutes.
This is by far the simplest solution to solve the uploaded file size error.
2. Updating Your php.ini file
Each server has a php.ini file which is usually found in the WP-admin folder. You’ll need to edit that file by opening it to change to a new memory limit.
- Log in to your website hosting account then go to cPanel.
- Click on FILES -> File Manager.
- Click on “Document Root for” in the Directory Selection then select Go. (Ensure to select the checkbox for Show Hidden Files).
- Go to your WP-admin folder and follow the instructions.
3. Editing Your .htaccess file
To remedy the uploaded file exceeds file size directive in php.ini, you may also edit your .htaccess file to fix this issue.
- Log in to your web hosting account and go to cPanel.
- Click on FILES -> File Manager.
- Click on “Document Root for:” in the Directory Selection then select Go.
- Find the httaccess file.
- Open the .htaccess file and edit.
4. Editing your wp-config.php File
- Log in to your web hosting account and go to cPanel
- Click on FILES -> File Manager
- Find the httaccess file.
- Open the .htaccess file and or edit the following code at the bottom.
Now that you now know how to resolve the uploaded file exceeds the upload_max_filesize directive in php.ini errors.
Conclusion
We are happy that you now know not one, but four ways to troubleshoot the upload max file size on your WordPress site.
Whichever method you choose to use, just make sure that you follow the easy to understand simple instructions given.