{"id":33862,"date":"2024-03-20T14:40:05","date_gmt":"2024-03-20T14:40:05","guid":{"rendered":"https:\/\/10web.io\/blog\/?p=33862"},"modified":"2024-12-23T11:58:51","modified_gmt":"2024-12-23T11:58:51","slug":"uploaded-file-exceeds-the-upload_max_filesize-directive-in-php-ini","status":"publish","type":"post","link":"https:\/\/10web.io\/blog\/uploaded-file-exceeds-the-upload_max_filesize-directive-in-php-ini\/","title":{"rendered":"Fixing the Uploaded File Exceeds the Upload_Max_Filesize Directive in php.ini Error"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">When you&#8217;re working to upload a file to a website or a server and come across the error message stating &#8220;the uploaded file exceeds the upload_max_filesize directive in php.ini,&#8221; it&#8217;s like hitting an invisible wall. This error directly points to a restriction in your server&#8217;s PHP configuration that&#8217;s preventing your file from making it through. Understanding this error requires a bit of a deep dive into how PHP settings work and what they mean for your website or application&#8217;s file handling capabilities.<\/span><\/p>\n<h2 id=\"what-this-error-means\"><span style=\"font-weight: 400;\">What this error means<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">The idea of limiting the size of an uploaded file comes down to a practical need: preserving server resources. Web hosting providers implement this limit to ensure the server remains fast and responsive for everyone. This cap on file size, measured in megabytes (MB), is governed by a specific directive known as `upload_max_filesize`.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The `upload_max_filesize` setting resides in a configuration file called `php.ini`. This file is the backbone of server settings for applications that run PHP, which is a widespread server-side scripting language used in web development. When you encounter an error related to exceeding the upload_max_filesize limit, it&#8217;s this PHP configuration setting that&#8217;s at the heart of the matter.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">It&#8217;s essential to distinguish that this upload limit isn&#8217;t something WordPress, or any other application, decides on its own. However, you&#8217;ll definitely run into this limit within WordPress when attempting to upload media. For instance, if you navigate to Media \u2192 Add New on your WordPress dashboard, you&#8217;ll see the maximum upload file size specified there. This limit varies depending on your hosting provider. For example, 10Web offers a 128 MB limit, which is more than sufficient for most needs. In contrast, other hosting services might set this limit as low as 2 MB or 4 MB, which can be quite restrictive.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">So, when you attempt to upload a file that&#8217;s larger than the allowed limit, you&#8217;re met with \u201cthe uploaded file exceeds the upload_max_filesize directive in php.ini\u201d error. Alternatively, you might see a variation like \u201cfile_name exceeds the maximum upload size for this site.\u201d<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Understanding this limitation and knowing how to navigate it is key to managing your website effectively. If you find yourself frequently bumping up against this limit, there are ways to adjust it, which involves accessing and modifying the `php.ini` file, or using other methods like `.htaccess` or `wp-config.php` for WordPress-specific sites. Each method has its own set of steps and considerations, but adjusting this limit can greatly enhance your site&#8217;s media handling capabilities, making it more versatile and user-friendly.<\/span><\/p>\n<h3 id=\"variations-of-this-error\"><span style=\"font-weight: 400;\">Variations of this error<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">This error can present itself in various ways depending on the environment you&#8217;re working in. Some common variations include:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">&#8220;File too large to upload&#8221; in web applications<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">&#8220;Exceeds the maximum upload size for this site&#8221; on WordPress or other CMS platforms<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Direct references to `upload_max_filesize` in PHP error logs or debugging tools<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">A generic &#8220;HTTP error&#8221; when trying to upload files in certain web interfaces<\/span><\/li>\n<\/ul>\n<h2 id=\"reasons-why-this-error-occurs\"><span style=\"font-weight: 400;\">Reasons why this error occurs<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Several reasons can trigger this error, including:<\/span><\/p>\n<p><b>Server default settings<\/b><span style=\"font-weight: 400;\">: Many servers come with a conservative `upload_max_filesize` setting by default, often 2MB or 8MB, to manage resources effectively and prevent abuse.<\/span><\/p>\n<p><b>Application requirements<\/b><span style=\"font-weight: 400;\">: Some applications or websites require the upload of large files (e.g., videos, PDFs, or large datasets), which can easily exceed the default limits set in `php.ini`.<\/span><\/p>\n<p><b>Mismatched settings<\/b><span style=\"font-weight: 400;\">: The `upload_max_filesize` directive isn&#8217;t the only setting that controls file uploads. The `post_max_size` directive, which limits the maximum size of POST data, must also be configured appropriately; otherwise, increasing `upload_max_filesize` alone won&#8217;t resolve the issue.<\/span><\/p>\n<h2 id=\"fixing-the-uploaded-file-exceeds-the-upload_max_filesize-directive-in-php-ini\"><span style=\"font-weight: 400;\">Fixing the uploaded file exceeds the upload_max_filesize directive in php.ini <\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Resolving this error involves increasing the <\/span><b>upload_max_filesize<\/b><span style=\"font-weight: 400;\">. You can choose the method you are most comfortable with. The method also depends on setup provided by your hosting service. <\/span><\/p>\n<h3 id=\"contact-support\"><span style=\"font-weight: 400;\">Contact support<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Sometimes, the easiest solution doesn&#8217;t require you to touch any configuration files at all.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Reaching out to your hosting provider&#8217;s support team can be the quickest and most hassle-free way to solve this issue. This approach isn&#8217;t just about saving time; it&#8217;s about leveraging the expertise of professionals who handle such requests daily. Whether you&#8217;re running a small blog or a large e-commerce platform, your hosting support is there to ensure your website operates smoothly.<\/span><\/p>\n<h3 id=\"modify-the-php-ini-file-in-cpanel\"><span style=\"font-weight: 400;\">Modify the php.ini file in cPanel<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Adjusting the `upload_max_filesize` and `post_max_size` directives in your `php.ini` file is a straightforward way to lift those limits.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The `php.ini` file is the cornerstone of PHP configuration on your server. Depending on your hosting setup, this file can usually be found in the root directory of your website or in a PHP configuration directory.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For shared hosting or environments where you don&#8217;t have direct file access, cPanel offers a user-friendly way to edit PHP settings without needing to open a text editor or access the server via SSH.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Using cPanel to edit `php.ini` settings<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Multil-pho-in-editor-in-cPanel.jpg\" alt=\"Multi php ini editor in cPanel\" width=\"1560\" height=\"875\" class=\"alignnone size-full wp-image-33866\" srcset=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Multil-pho-in-editor-in-cPanel.jpg 1560w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Multil-pho-in-editor-in-cPanel-742x416.jpg 742w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Multil-pho-in-editor-in-cPanel-1484x832.jpg 1484w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Multil-pho-in-editor-in-cPanel-150x84.jpg 150w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Multil-pho-in-editor-in-cPanel-768x431.jpg 768w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Multil-pho-in-editor-in-cPanel-1536x862.jpg 1536w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Multil-pho-in-editor-in-cPanel-371x208.jpg 371w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Multil-pho-in-editor-in-cPanel-600x337.jpg 600w\" sizes=\"auto, (max-width: 1560px) 100vw, 1560px\" \/><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Log into your cPanel dashboard and look for the &#8220;MultiPHP INI Editor&#8221; under the Software section. This tool is designed to simplify the process of modifying PHP configuration.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Once you&#8217;re in the MultiPHP INI Editor, you&#8217;ll see a drop-down menu where you can choose the specific domain or application you&#8217;re adjusting settings for. <\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">After selecting your site, look for the `upload_max_filesize` and `post_max_size` directives. These two settings control the maximum size of files that can be uploaded through PHP and the maximum size of POST data that PHP will accept, respectively. Set both values to whatever limit you require.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">After inputting your new values, make sure to save your changes.<\/span><\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Upload-file-max-size-in-cPanel.jpg\" alt=\"Upload file max size in cPanel\" width=\"1560\" height=\"875\" class=\"alignnone size-full wp-image-33867\" srcset=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Upload-file-max-size-in-cPanel.jpg 1560w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Upload-file-max-size-in-cPanel-742x416.jpg 742w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Upload-file-max-size-in-cPanel-1484x832.jpg 1484w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Upload-file-max-size-in-cPanel-150x84.jpg 150w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Upload-file-max-size-in-cPanel-768x431.jpg 768w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Upload-file-max-size-in-cPanel-1536x862.jpg 1536w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Upload-file-max-size-in-cPanel-371x208.jpg 371w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Upload-file-max-size-in-cPanel-600x337.jpg 600w\" sizes=\"auto, (max-width: 1560px) 100vw, 1560px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">To ensure everything is working as expected, try uploading a file that previously exceeded the limit. If done correctly, you should no longer encounter the upload size error.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In some cases, especially on VPS or dedicated servers, you might need to restart your web server for the changes to take effect. This can usually be done through cPanel&#8217;s interface or by contacting your hosting provider&#8217;s support.<\/span><\/p>\n<h3 id=\"modifying-the-php-ini-via-ftp\"><span style=\"font-weight: 400;\">Modifying the php.ini via FTP<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Not all hosts allow direct modifications to the `php.ini` file, leading to an interesting workaround involving the `.htaccess` file. You can check to see if you have permission to alter or create a <\/span><\/p>\n<p><span style=\"font-weight: 400;\">php.ini file using an FTP client. If this doesn\u2019t work, then you can move forward with modifying the .htaccess file. <\/span><\/p>\n<h4><span style=\"font-weight: 400;\">Modifying or creating a php.ini file<\/span><\/h4>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Use an FTP client to access your server. This step requires FTP credentials, which are typically provided by your hosting service.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Navigate to the site\u2019s root folder usually named `public_html`, `www`, or similarly. It&#8217;s the directory that houses your website&#8217;s files.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\"> If a `php.ini` file already exists in your root folder, open it with a text editor. If not, create a new text file and name it `php.ini`.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Add or modify the following lines. Adjust the numbers according to your requirements:<\/span><\/li>\n<\/ol>\n<pre>upload_max_filesize = 12M\r\npost_max_size = 13M\r\nmemory_limit = 15M<\/pre>\n<p><span style=\"font-weight: 400;\">The `upload_max_filesize` and `post_max_size` values ensure you can upload large files, while `memory_limit` affects how much memory a PHP script can consume, crucial for intensive plugins or themes.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Some hosting environments, especially those running suPHP (a tool for executing PHP scripts with the permissions of their owners), require a special declaration in your `.htaccess` file to acknowledge your `php.ini` changes.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Edit your .htaccess file with the following code, replacing <\/span><b>yourusername<\/b><span style=\"font-weight: 400;\"> with the real file path of your website:<\/span><b>&lt;IfModule mod_suphp.c&gt;<\/b><\/p>\n<pre>suPHP_ConfigPath \/home\/yourusername\/public_html\r\n&lt;\/IfModule&gt;<\/pre>\n<h3 id=\"modifying-htaccess-to-increase-upload-limits\"><span style=\"font-weight: 400;\">Modifying .htaccess to increase upload limits<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">This method is particularly helpful for those who find themselves at a standstill with `php.ini` modifications, either due to host restrictions or simply because the changes aren&#8217;t taking effect as expected. Here\u2019s how you can use the `.htaccess` file to tweak your PHP settings, specifically targeting file upload limits and memory allocation.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/max_execution_time-htaccess.jpg\" alt=\"The htaccess file is highlighted in red and appears in the list of website files in the FTP client.\" width=\"1560\" height=\"875\" class=\"alignnone size-full wp-image-28158\" srcset=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/max_execution_time-htaccess.jpg 1560w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/max_execution_time-htaccess-742x416.jpg 742w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/max_execution_time-htaccess-1484x832.jpg 1484w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/max_execution_time-htaccess-150x84.jpg 150w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/max_execution_time-htaccess-768x431.jpg 768w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/max_execution_time-htaccess-1536x862.jpg 1536w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/max_execution_time-htaccess-371x208.jpg 371w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/max_execution_time-htaccess-600x337.jpg 600w\" sizes=\"auto, (max-width: 1560px) 100vw, 1560px\" \/><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Connect to your site via FTP<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Once connected, navigate to the root folder of your site, commonly named `public_html` or `www`.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Locate the `.htaccess` file. It should be in your site&#8217;s root directory. <\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">If you can&#8217;t see it, ensure your FTP client is set to show hidden files by navigating to \u2018Server\u2019 &gt; \u2018Force showing hidden files.\u2019 <\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Double click on the .htaccess file to open it with a text editor. If you\u2019re creating a new one because it doesn\u2019t exist, simply create a new text file and name it `.htaccess`.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Add the following lines at the top of the file, adjusting the values to meet your specific needs:<\/span><\/li>\n<\/ol>\n<pre>php_value upload_max_filesize 12M\r\nphp_value post_max_size 13M\r\nphp_value memory_limit 15<span style=\"font-weight: 400;\">M<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">It\u2019s important to note that after making these changes, if your site starts showing an internal server error, it\u2019s likely that your server is running PHP in CGI mode, which does not support these `.htaccess` directives.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Remove the lines you just added from the `.htaccess` file to restore your site&#8217;s functionality.<\/span><\/p>\n<h3 id=\"adjusting-php-values-for-10web-customers\"><span style=\"font-weight: 400;\">Adjusting PHP values for 10Web customers<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">10Web utilizes NGINX instead of Apache, which means there\u2019s no `.htaccess` file to modify. For 10Web users encountering upload limit issues, 10Web has a quick and user friendly approach. You can find the solution in your dashboard.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/PHP-limits-in-10Web.jpg\" alt=\"Changing PHP upload limit from the 10Web dashboard. \" width=\"1560\" height=\"875\" class=\"alignnone size-full wp-image-33868\" srcset=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/PHP-limits-in-10Web.jpg 1560w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/PHP-limits-in-10Web-742x416.jpg 742w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/PHP-limits-in-10Web-1484x832.jpg 1484w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/PHP-limits-in-10Web-150x84.jpg 150w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/PHP-limits-in-10Web-768x431.jpg 768w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/PHP-limits-in-10Web-1536x862.jpg 1536w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/PHP-limits-in-10Web-371x208.jpg 371w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/PHP-limits-in-10Web-600x337.jpg 600w\" sizes=\"auto, (max-width: 1560px) 100vw, 1560px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">To adjust or increase your site\u2019s PHP values:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Log in to your 10Web account. <\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Click on the website where the error has occurred.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Navigate to \u2018Hosting Services\u2019 &gt; \u2018Tools.\u2019<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Scroll down and click \u2018Advanced settings.\u2019<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">To fix the error, click on the dropdown and adjust the value for \u2018Upload Limit.\u2019<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Click \u2018Save\u2019 to implement the changes. <\/span><\/li>\n<\/ol>\n<h2 id=\"closing-thoughts\"><span style=\"font-weight: 400;\">Closing thoughts<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Navigating the &#8220;uploaded file exceeds the upload_max_filesize directive in php.ini&#8221; error involves a few different strategies based on server setup and access levels. We&#8217;ve discussed direct adjustments in the php.ini file and leveraging the .htaccess file for those on Apache servers. For instances where direct file access isn&#8217;t feasible, contacting hosting support is recommended. For 10Web customers, the scenario differs slightly due to 10Web&#8217;s use of NGINX, which doesn&#8217;t support .htaccess modifications. However, 10Web offers a streamlined, user-friendly method for adjusting PHP values directly from the dashboard. Each approach aims to enhance your website&#8217;s functionality, enabling larger file uploads and improved performance.<\/span><\/p>\n<p><div class=\"website_creation_outer\">\n\t<div class=\"content_holder\">\n\t\t<h4>Accelerate your WordPress website creation with AI<\/h4>\n\t\t<p>Create a custom WordPress website tailored to your business needs 10X faster with 10Web AI Website Builder.<\/p>\n\t<\/div>\n\t<div class=\"cta_holder\">\n\t\t<div class=\"btn\">\n\t\t\t<a href=\"https:\/\/10web.io\/ai-website-builder\/\">\n\t\t\t\tGenerate Your Website\n\t\t\t<\/a>\n\t\t<\/div>\n\t\t<div class=\"subtitle\">\n\t\t\t<img decoding=\"async\" width=\"18px\" height=\"18px\" src=\"https:\/\/10web.io\/blog\/wp-content\/themes\/10web-blog\/images\/shortcodes\/icon_check.svg\"\/>\n\t\t\tNo credit card required\n\t\t<\/div>\n\t<\/div>\n<\/div>\n<br \/>\n\r\n<style>\r\n  #ctablocks_scrollbox-with-icon_89{\r\n            color: #ffffff;\r\n    border-radius: 6px;\r\n  }\r\n\r\n  #ctablocks_scrollbox-with-icon_89 p{\r\n    color: #ffffff;\r\n  }\r\n  #ctablocks_scrollbox-with-icon_89 .button{\r\n          background-color: rgb(51,57,241);\r\n        color: #ffffff;\r\n    border-color: #3339f1 !important;\r\n  }\r\n  #ctablocks_scrollbox-with-icon_89 .button:hover{\r\n    background: rgba(51,57,241,0.8);\r\n    color: #ffffff;\r\n    opacity: 1;\r\n  }\r\n  #ctablocks_scrollbox-with-icon_89.ctablocks_container {\r\n    left: 100%;\r\n  }\r\n  @media screen and (max-width: 1300px) {\r\n      #ctablocks_scrollbox-with-icon_89.ctablocks_container {\r\n          left: 0;\r\n          margin: 0 auto;\r\n      }\r\n  }\r\n  #ctablocks_scrollbox-with-icon_89 .ctablocks_content {\r\n      background-color: #000000;\r\n  }\r\n<\/style>\r\n<div id=\"ctablocks_scrollbox-with-icon_89\" class=\"ctablocks_container scrollbox-with-icon_type\r\n      \">\r\n\r\n  <div class=\"ctablocks_content clear\">\r\n    <div class=\"ctablocks_content_info\">\r\n              <h4>Say goodbye to website errors<\/h4>\r\n        <h4 class=\"mobile-title\">Fix all the website errors in one click<\/h4>\r\n              <p>Migrate your website to the world's best Managed WordPress Hosting.<\/p>\r\n          <\/div>\r\n    <div class=\"ctablocks_content_button\">\r\n              <a href=\"https:\/\/10web.io\/ai-website-builder\/\" class=\"button\" data-gtag=\"sign-up-blog\" data-buttontype=\"sign-up\" data-gtag=\"cta-89\" data-buttontype=\"cta-scrollbox-with-icon\"\r\n\t        >Migrate For Free<\/a>\r\n            \r\n    <\/div>\r\n  <\/div>\r\n    <span class=\"close_ctablocks\">\r\n      <img decoding=\"async\" class=\"close-icon\" src=\"https:\/\/10web.io\/blog\/wp-content\/plugins\/cta-blocks\/assets\/images\/close_w.svg\" class=\"close\">\r\n      <img decoding=\"async\" class=\"floating-icon\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Info-icon_Blog.png\" alt=\"Say goodbye to website errors\" title=\"Say goodbye to website errors\">\r\n<!--      <img decoding=\"async\" class=\"arrow-icon white\" src=\"\/cta-blocks\/assets\/images\/arrow-icon.svg\" class=\"close\">\r\n-->      <img decoding=\"async\" class=\"arrow-icon purple\" src=\"https:\/\/10web.io\/blog\/wp-content\/plugins\/cta-blocks\/assets\/images\/arrow-icon-purple.svg\" class=\"close\">\r\n  <\/span>\r\n<\/div>\r\n<br \/>\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you&#8217;re working to upload a file to a website or a server and come across the error message stating &#8220;the uploaded file exceeds the upload_max_filesize directive in php.ini,&#8221; it&#8217;s like hitting an invisible wall. This error directly points to a restriction in your server&#8217;s PHP configuration that&#8217;s preventing your file from making it through. Understanding this error requires a&#8230;<\/p>\n","protected":false},"author":39,"featured_media":33873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"two_page_speed":[],"footnotes":"","tenweb_blog_toc":"                                                                                                <ul>\r\n\t<li>\r\n\t\t<a href=\"#what-this-error-means\">What this error means<\/a>\r\n\t\t<ul>\r\n\t\t\t<li>\r\n\t\t\t\t<a href=\"#variations-of-this-error\">Variations of this error<\/a>\r\n\t\t\t<\/li>\r\n\t\t<\/ul>\r\n\t<\/li>\r\n\t<li>\r\n\t\t<a href=\"#reasons-why-this-error-occurs\">Reasons why this error occurs<\/a>\r\n\t<\/li>\r\n\t<li>\r\n\t\t<a href=\"#fixing-the-uploaded-file-exceeds-the-upload_max_filesize-directive-in-php-ini\">Fixing the uploaded file exceeds the upload_max_filesize directive in php.ini<\/a>\r\n\t\t<ul>\r\n\t\t\t<li>\r\n\t\t\t\t<a href=\"#contact-support\">Contact support<\/a>\r\n\t\t\t<\/li>\r\n\t\t\t<li>\r\n\t\t\t\t<a href=\"#modify-the-php-ini-file-in-cpanel\">Modify the php.ini file in cPanel<\/a>\r\n\t\t\t<\/li>\r\n\t\t\t<li>\r\n\t\t\t\t<a href=\"#modifying-the-php-ini-via-ftp\">Modifying the php.ini via FTP<\/a>\r\n\t\t\t<\/li>\r\n\t\t\t<li>\r\n\t\t\t\t<a href=\"#modifying-htaccess-to-increase-upload-limits\">Modifying .htaccess to increase upload limits<\/a>\r\n\t\t\t<\/li>\r\n\t\t\t<li>\r\n\t\t\t\t<a href=\"#adjusting-php-values-for-10web-customers\">Adjusting PHP values for 10Web customers<\/a>\r\n\t\t\t<\/li>\r\n\t\t<\/ul>\r\n\t<\/li>\r\n\t<li>\r\n\t\t<a href=\"#closing-thoughts\">Closing thoughts<\/a>\r\n\t<\/li>\r\n<\/ul>\r\n                                                                        ","tenweb_blog_competitor_type":"","tenweb_blog_competitor_names":"","tenweb_blog_twb_version":0,"tenweb_blog_type":"on"},"categories":[502],"tags":[],"class_list":["post-33862","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php-errors"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v23.0 (Yoast SEO v23.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Fix &quot;Uploaded File Exceeds upload_max_filesize&quot; | 10Web<\/title>\n<meta name=\"description\" content=\"Learn what causes the &quot;uploaded file exceeds the upload_max_filesize directive in php.ini&quot; error on your WordPress site and how to fix it.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/10web.io\/blog\/uploaded-file-exceeds-the-upload_max_filesize-directive-in-php-ini\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Fixing the Uploaded File Exceeds the Upload_Max_Filesize Directive in php.ini Error\" \/>\n<meta property=\"og:description\" content=\"Learn what causes the &quot;uploaded file exceeds the upload_max_filesize directive in php.ini&quot; error on your WordPress site and how to fix it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/10web.io\/blog\/uploaded-file-exceeds-the-upload_max_filesize-directive-in-php-ini\/\" \/>\n<meta property=\"og:site_name\" content=\"10Web - Build &amp; Host Your WordPress Website\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/10Web.io\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-20T14:40:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-12-23T11:58:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Fixing-the-Uploaded-File-Exceeds-the-Upload_Max_Filesize-Directive-in-php.ini-Error.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1560\" \/>\n\t<meta property=\"og:image:height\" content=\"875\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Sergey Markosyan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@10Web_io\" \/>\n<meta name=\"twitter:site\" content=\"@10Web_io\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sergey Markosyan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Fix \"Uploaded File Exceeds upload_max_filesize\" | 10Web","description":"Learn what causes the \"uploaded file exceeds the upload_max_filesize directive in php.ini\" error on your WordPress site and how to fix it.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/10web.io\/blog\/uploaded-file-exceeds-the-upload_max_filesize-directive-in-php-ini\/","og_locale":"en_US","og_type":"article","og_title":"Fixing the Uploaded File Exceeds the Upload_Max_Filesize Directive in php.ini Error","og_description":"Learn what causes the \"uploaded file exceeds the upload_max_filesize directive in php.ini\" error on your WordPress site and how to fix it.","og_url":"https:\/\/10web.io\/blog\/uploaded-file-exceeds-the-upload_max_filesize-directive-in-php-ini\/","og_site_name":"10Web - Build &amp; Host Your WordPress Website","article_publisher":"https:\/\/www.facebook.com\/10Web.io\/","article_published_time":"2024-03-20T14:40:05+00:00","article_modified_time":"2024-12-23T11:58:51+00:00","og_image":[{"width":1560,"height":875,"url":"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Fixing-the-Uploaded-File-Exceeds-the-Upload_Max_Filesize-Directive-in-php.ini-Error.jpg","type":"image\/jpeg"}],"author":"Sergey Markosyan","twitter_card":"summary_large_image","twitter_creator":"@10Web_io","twitter_site":"@10Web_io","twitter_misc":{"Written by":"Sergey Markosyan","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/10web.io\/blog\/uploaded-file-exceeds-the-upload_max_filesize-directive-in-php-ini\/#article","isPartOf":{"@id":"https:\/\/10web.io\/blog\/uploaded-file-exceeds-the-upload_max_filesize-directive-in-php-ini\/"},"author":{"name":"Sergey Markosyan","@id":"https:\/\/10web.io\/blog\/#\/schema\/person\/c8350d9b5223c607a2b79f6d4b8a52d6"},"headline":"Fixing the Uploaded File Exceeds the Upload_Max_Filesize Directive in php.ini Error","datePublished":"2024-03-20T14:40:05+00:00","dateModified":"2024-12-23T11:58:51+00:00","mainEntityOfPage":{"@id":"https:\/\/10web.io\/blog\/uploaded-file-exceeds-the-upload_max_filesize-directive-in-php-ini\/"},"wordCount":1722,"commentCount":0,"publisher":{"@id":"https:\/\/10web.io\/blog\/#organization"},"image":{"@id":"https:\/\/10web.io\/blog\/uploaded-file-exceeds-the-upload_max_filesize-directive-in-php-ini\/#primaryimage"},"thumbnailUrl":"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Fixing-the-Uploaded-File-Exceeds-the-Upload_Max_Filesize-Directive-in-php.ini-Error.jpg","articleSection":["PHP Errors"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/10web.io\/blog\/uploaded-file-exceeds-the-upload_max_filesize-directive-in-php-ini\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/10web.io\/blog\/uploaded-file-exceeds-the-upload_max_filesize-directive-in-php-ini\/","url":"https:\/\/10web.io\/blog\/uploaded-file-exceeds-the-upload_max_filesize-directive-in-php-ini\/","name":"Fix \"Uploaded File Exceeds upload_max_filesize\" | 10Web","isPartOf":{"@id":"https:\/\/10web.io\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/10web.io\/blog\/uploaded-file-exceeds-the-upload_max_filesize-directive-in-php-ini\/#primaryimage"},"image":{"@id":"https:\/\/10web.io\/blog\/uploaded-file-exceeds-the-upload_max_filesize-directive-in-php-ini\/#primaryimage"},"thumbnailUrl":"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Fixing-the-Uploaded-File-Exceeds-the-Upload_Max_Filesize-Directive-in-php.ini-Error.jpg","datePublished":"2024-03-20T14:40:05+00:00","dateModified":"2024-12-23T11:58:51+00:00","description":"Learn what causes the \"uploaded file exceeds the upload_max_filesize directive in php.ini\" error on your WordPress site and how to fix it.","breadcrumb":{"@id":"https:\/\/10web.io\/blog\/uploaded-file-exceeds-the-upload_max_filesize-directive-in-php-ini\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/10web.io\/blog\/uploaded-file-exceeds-the-upload_max_filesize-directive-in-php-ini\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/10web.io\/blog\/uploaded-file-exceeds-the-upload_max_filesize-directive-in-php-ini\/#primaryimage","url":"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Fixing-the-Uploaded-File-Exceeds-the-Upload_Max_Filesize-Directive-in-php.ini-Error.jpg","contentUrl":"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/03\/Fixing-the-Uploaded-File-Exceeds-the-Upload_Max_Filesize-Directive-in-php.ini-Error.jpg","width":1560,"height":875,"caption":"Fixing the Uploaded File Exceeds the Upload_Max_Filesize Directive in php.ini Error"},{"@type":"BreadcrumbList","@id":"https:\/\/10web.io\/blog\/uploaded-file-exceeds-the-upload_max_filesize-directive-in-php-ini\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/10web.io\/blog\/"},{"@type":"ListItem","position":2,"name":"Fixing the Uploaded File Exceeds the Upload_Max_Filesize Directive in php.ini Error"}]},{"@type":"WebSite","@id":"https:\/\/10web.io\/blog\/#website","url":"https:\/\/10web.io\/blog\/","name":"10Web Blog - Build & Host Your WordPress Website","description":"10Web is an All-in-One Website Building Platform, offering Managed WordPress Hosting on Google Cloud, Beautiful Templates, Premium Plugins and Services.","publisher":{"@id":"https:\/\/10web.io\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/10web.io\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/10web.io\/blog\/#organization","name":"10Web","url":"https:\/\/10web.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/10web.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2025\/04\/Logo-768x686-1.png","contentUrl":"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2025\/04\/Logo-768x686-1.png","width":768,"height":686,"caption":"10Web"},"image":{"@id":"https:\/\/10web.io\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/10Web.io\/","https:\/\/x.com\/10Web_io","https:\/\/www.instagram.com\/10web.io\/","https:\/\/www.linkedin.com\/company\/10web\/mycompany\/","https:\/\/www.youtube.com\/c\/10Web"]},{"@type":"Person","@id":"https:\/\/10web.io\/blog\/#\/schema\/person\/c8350d9b5223c607a2b79f6d4b8a52d6","name":"Sergey Markosyan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/10web.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5dee1e06f3b02cc0b043d015850db7ca?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5dee1e06f3b02cc0b043d015850db7ca?s=96&d=mm&r=g","caption":"Sergey Markosyan"},"description":"Sergey Markosyan is the Co-Founder and CTO at 10Web. He leads the development of the 10Web platform, identifies and solves problems in the development process across the organization a true sensei for the engineering team.","sameAs":["https:\/\/www.linkedin.com\/in\/sergey-markosyan\/"],"url":"https:\/\/10web.io\/blog\/author\/sergey\/"}]}},"acf":[],"_links":{"self":[{"href":"https:\/\/10web.io\/blog\/wp-json\/wp\/v2\/posts\/33862","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/10web.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/10web.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/10web.io\/blog\/wp-json\/wp\/v2\/users\/39"}],"replies":[{"embeddable":true,"href":"https:\/\/10web.io\/blog\/wp-json\/wp\/v2\/comments?post=33862"}],"version-history":[{"count":0,"href":"https:\/\/10web.io\/blog\/wp-json\/wp\/v2\/posts\/33862\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/10web.io\/blog\/wp-json\/wp\/v2\/media\/33873"}],"wp:attachment":[{"href":"https:\/\/10web.io\/blog\/wp-json\/wp\/v2\/media?parent=33862"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/10web.io\/blog\/wp-json\/wp\/v2\/categories?post=33862"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/10web.io\/blog\/wp-json\/wp\/v2\/tags?post=33862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}