{"id":748,"date":"2017-01-24T00:00:00","date_gmt":"2017-01-24T00:00:00","guid":{"rendered":"http:\/\/blog.hostinger.io\/hostinger-tutorials\/uncategorized\/how-to-increase-the-maximum-file-upload-size-in-wordpress\/"},"modified":"2025-12-22T13:41:55","modified_gmt":"2025-12-22T13:41:55","slug":"php-maximum-upload-size","status":"publish","type":"post","link":"\/tutorials\/php-maximum-upload-size","title":{"rendered":"How to modify the PHP max upload size"},"content":{"rendered":"<p>When you try running a script, plugin, or uploading large files to your website, you might encounter an error. One of the possible causes of this issue &ndash; the upload exceeds the default maximum file size configuration on your web server.<\/p><p>In this article, we will show you three easy ways to increase the size limit by modifying the PHP maximum upload size.<\/p><figure class=\"wp-block-image size-large\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/How-to-Speed-Up-Your-Website-EN.pdf\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" width=\"2048\" height=\"566\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/eBook-Speed-Up-your-website.png\/public\" alt=\"\" class=\"wp-image-69260\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/eBook-Speed-Up-your-website.png\/w=2048,fit=scale-down 2048w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/eBook-Speed-Up-your-website.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/eBook-Speed-Up-your-website.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/eBook-Speed-Up-your-website.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/eBook-Speed-Up-your-website.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 2048px) 100vw, 2048px\" \/><\/a><\/figure><p>\n\n\n\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-why-change-the-php-max-upload-size\">Why Change the PHP Max Upload Size<\/h2><p>The default maximum upload file size may vary depending on your hosting provider, usually staying around 128 MB. While this is typically enough for audio or picture files, you may encounter an error when uploading large files such as long videos.<\/p><p>If your site consists mainly of such content, you might want to increase the upload file size limit for more flexibility. On the other hand, you may wish to decrease the PHP max post size if you have limited storage.<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-change-the-maximum-upload-size-for-php-scripts\">How to Change the Maximum Upload Size for PHP Scripts<\/h2><p>There are several methods to modify your site&rsquo;s maximum upload file size, and they may vary depending on your circumstances and preferences. Users can change PHP parameters by using the PHP configuration menu on their hosting control panel or manually modifying specific scripts that handle file uploads.<\/p><p>In most cases, you can change the PHP maximum file size limit by <a href=\"https:\/\/www.simplified.guide\/php\/increase-upload-size\" target=\"_blank\" rel=\"noreferrer noopener\">editing the php.ini file<\/a>. If you are using a shared or cloud hosting plan, you&rsquo;ll want to modify the <a href=\"\/tutorials\/create-default-wordpress-htaccess-file\" target=\"_blank\" rel=\"noreferrer noopener\">.htaccess file<\/a> instead.<\/p><p>\n\n\n    <p class=\"warning\">\n        <strong>Warning!<\/strong>The PHP max post size can only be increased up to your hosting plan&rsquo;s PHP memory limit. Take a look at the table below to know the PHP memory limit for your Hostinger hosting plan.    <\/p>\n    \n\n\n\n<\/p><p>Let&rsquo;s take a look at three easy ways to edit your PHP settings and adjust your upload file size limit.<\/p><h3 class=\"wp-block-heading\" id=\"h-option-1-changing-maximum-upload-file-size-via-hpanel\">Option 1. Changing Maximum Upload File Size via hPanel<\/h3><ol class=\"wp-block-list\">\n<li>To modify file upload limitations in Hostinger&rsquo;s hPanel, click <strong>Manage<\/strong> on the Hosting panel and look up <strong>PHP Configuration<\/strong> in the Advanced section.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2017\/01\/hpanel-advanced-phpconfiguration.png\"><img decoding=\"async\" width=\"398\" height=\"316\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2017\/01\/hpanel-advanced-phpconfiguration.png\/public\" alt=\"Hostinger left side menu Advanced section with PHP configuration highlighted \" class=\"wp-image-79456\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2017\/01\/hpanel-advanced-phpconfiguration.png\/w=398,fit=scale-down 398w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2017\/01\/hpanel-advanced-phpconfiguration.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2017\/01\/hpanel-advanced-phpconfiguration.png\/w=150,fit=scale-down 150w\" sizes=\"(max-width: 398px) 100vw, 398px\" \/><\/a><\/figure><\/div><ol start=\"2\" class=\"wp-block-list\">\n<li>Open the <strong>PHP Options<\/strong> tab. Users can change various limits and parameters on this page, including max execution time and memory limit.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2022\/02\/php-options-php-configuration.png\"><img decoding=\"async\" width=\"1130\" height=\"204\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/php-options-php-configuration.png\/public\" alt=\"The PHP options tab in hPanel's PHP Configuration menu\" class=\"wp-image-45760\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/php-options-php-configuration.png\/w=1130,fit=scale-down 1130w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/php-options-php-configuration.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/php-options-php-configuration.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/php-options-php-configuration.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/php-options-php-configuration.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1130px) 100vw, 1130px\" \/><\/a><\/figure><\/div><ol start=\"3\" class=\"wp-block-list\">\n<li>To change the maximum size for uploaded files, search for the <strong>uploadMaxFilesize <\/strong>field. Choose your desired data size from the drop-down menu. In the example below, the default size is set to 512 MB.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2022\/02\/uploadmaxfilesize.png\"><img decoding=\"async\" width=\"1105\" height=\"153\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/uploadmaxfilesize.png\/public\" alt=\"The uploadMaxFilesize field in hPanel\" class=\"wp-image-45761\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/uploadmaxfilesize.png\/w=1105,fit=scale-down 1105w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/uploadmaxfilesize.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/uploadmaxfilesize.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/uploadmaxfilesize.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/uploadmaxfilesize.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1105px) 100vw, 1105px\" \/><\/a><\/figure><\/div><ol start=\"4\" class=\"wp-block-list\">\n<li>Another option you might want to change here is <strong>postMaxSize. <\/strong>It controls the maximum size of files uploaded using the POST method.&nbsp;<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2022\/02\/postmaxsize.png\"><img decoding=\"async\" width=\"1095\" height=\"152\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/postmaxsize.png\/public\" alt=\"The postMaxSize field in hPanel\" class=\"wp-image-45762\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/postmaxsize.png\/w=1095,fit=scale-down 1095w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/postmaxsize.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/postmaxsize.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/postmaxsize.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/postmaxsize.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1095px) 100vw, 1095px\" \/><\/a><\/figure><\/div><ol start=\"5\" class=\"wp-block-list\">\n<li>Don&rsquo;t forget to click <strong>Save<\/strong> at the bottom right corner of the page after you finish editing the settings.<\/li>\n<\/ol><p>\n\n\n<div><p class=\"important\"><strong>Important!<\/strong> Note that the postMaxSize should always be larger than uploadMaxFilesize to avoid errors when uploading data. <\/p><\/div>\n\n\n\n<\/p><h3 class=\"wp-block-heading\" id=\"option-2-altering-php-parameters-using-cpanel\">Option 2. Altering PHP Parameters Using cPanel<\/h3><ol class=\"wp-block-list\">\n<li>Access your <a href=\"\/tutorials\/what-is-cpanel\" target=\"_blank\" rel=\"noreferrer noopener\">cPanel<\/a> dashboard and find <strong>Select PHP Version<\/strong> in the Software section. In this menu, users can <a href=\"\/tutorials\/how-to-change-your-php-version\">change their PHP version<\/a>, choose which extensions to activate, and change other PHP-related settings.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2022\/02\/select-php-version-cpanel.png\"><img decoding=\"async\" width=\"1024\" height=\"179\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/select-php-version-cpanel.png\/public\" alt=\"The Select PHP version option in the software section in hPanel\" class=\"wp-image-45763\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/select-php-version-cpanel.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/select-php-version-cpanel.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/select-php-version-cpanel.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/select-php-version-cpanel.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><ol start=\"2\" class=\"wp-block-list\">\n<li>Click the <strong>Options<\/strong> tab and search for <strong>post_max_size<\/strong> and <strong>upload_max_filesize<\/strong>. Choose your desired file upload limits from the dropdown menu.<\/li>\n<\/ol><div class=\"wp-block-image is-style-default\">\n<figure class=\"aligncenter size-full\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2022\/02\/uploadmaxfilesize-postmaxsize.png\"><img decoding=\"async\" width=\"803\" height=\"648\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/uploadmaxfilesize-postmaxsize.png\/public\" alt=\"The post_max_size field and upload_max_filesize field in cPanel\" class=\"wp-image-45764\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/uploadmaxfilesize-postmaxsize.png\/w=803,fit=scale-down 803w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/uploadmaxfilesize-postmaxsize.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/uploadmaxfilesize-postmaxsize.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/uploadmaxfilesize-postmaxsize.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 803px) 100vw, 803px\" \/><\/a><\/figure><\/div><h3 class=\"wp-block-heading\" id=\"option-3-changing-php-post-max-size-via-the-htaccess-file\">Option 3. Changing PHP Post Max Size via the .htaccess File<\/h3><ol class=\"wp-block-list\">\n<li>To change your post size limits using PHP scripts, navigate to File Manager in your hPanel.<\/li>\n<\/ol><figure class=\"wp-block-image size-large\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/How-to-Speed-Up-Your-Website-EN.pdf\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"2048\" height=\"566\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/eBook-Speed-Up-your-website.png\/public\" alt=\"\" class=\"wp-image-69260\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/eBook-Speed-Up-your-website.png\/w=2048,fit=scale-down 2048w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/eBook-Speed-Up-your-website.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/eBook-Speed-Up-your-website.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/eBook-Speed-Up-your-website.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/eBook-Speed-Up-your-website.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 2048px) 100vw, 2048px\" \/><\/a><\/figure><ol start=\"2\" class=\"wp-block-list\">\n<li>Open the <strong>public_html<\/strong> folder and find <strong>.htaccess<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/04\/filemanager-htaccess-selected.png\"><img decoding=\"async\" width=\"1024\" height=\"449\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/04\/filemanager-htaccess-selected.png\/public\" alt=\"The .htaccess file in hPanel's public_html folder\" class=\"wp-image-82856\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/04\/filemanager-htaccess-selected.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/04\/filemanager-htaccess-selected.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/04\/filemanager-htaccess-selected.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/04\/filemanager-htaccess-selected.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><ol start=\"3\" class=\"wp-block-list\">\n<li>Open the file and insert the following PHP scripts:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">php_value upload_max_filesize&nbsp; XXM\nphp_value post_max_size XXM<\/pre><ol start=\"4\" class=\"wp-block-list\">\n<li>Change the &ldquo;XX&rdquo; into your desired size.<\/li>\n\n\n\n<li>Once you&rsquo;re done with the configuration, click <strong>Save &amp; Close<\/strong>.<\/li>\n<\/ol><p>\n\n\n<div class=\"protip\">\n                    <h4 class=\"title\">Pro Tip<\/h4>\n                    <p>You can also edit .htaccess via an FTP client like FileZilla. If you can&rsquo;t find the <strong>.htaccess file<\/strong>, configure your control panel or FTP client to display hidden files.<\/p>\n                <\/div>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"how-to-check-the-maximum-file-size-value\">How to Check the Maximum File Size Value<\/h2><p>After changing the settings of your uploaded file size limits, we need to confirm them with the <strong>phpinfo()<\/strong> function to ensure they&rsquo;re already implemented on the system. Simply create a new PHP file in the <strong>public_html<\/strong> directory of your site and insert the following PHP code:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?php\n&nbsp;&nbsp;&nbsp;&nbsp;phpinfo();\n &nbsp;&nbsp;&nbsp;&nbsp;phpinfo(); <\/pre><p>You can name the file anything you want. In this example, we named it <strong>phpinfo.php<\/strong>. To access the file we just created, just add <strong>\/phpinfo.php<\/strong> at the end of your site&rsquo;s domain. It may look like this: <strong>http:\/\/yoursite.com\/phpinfo.php<\/strong>.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2022\/02\/356m-uploadmaxfilesize.png\"><img decoding=\"async\" width=\"1454\" height=\"172\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/356m-uploadmaxfilesize.png\/public\" alt=\"The upload_max_filesize field in hPanel, highlighting that the size of the file is 356M\" class=\"wp-image-45766\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/356m-uploadmaxfilesize.png\/w=1454,fit=scale-down 1454w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/356m-uploadmaxfilesize.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/356m-uploadmaxfilesize.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/356m-uploadmaxfilesize.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/02\/356m-uploadmaxfilesize.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1454px) 100vw, 1454px\" \/><\/a><\/figure><\/div><p>You&rsquo;ll see two columns &mdash; local value and master value. Local values are set within <strong>.htaccess<\/strong> and override the master values which are set within the <strong>php.ini <\/strong>file. Pay no mind to the master values and seek the local values for <strong>upload_max_filesize<\/strong> and <strong>post_max_size<\/strong> instead.<\/p><p>If the local values of both parameters are the same as you configured, you have successfully changed your website&rsquo;s PHP file size limits.<\/p><figure class=\"wp-block-image size-full\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-web-hosting\" href=\"\/web-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/11\/Web-hosting_in-text-banner.png\/public\" alt=\"Hostinger web hosting banner\" class=\"wp-image-98604\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/11\/Web-hosting_in-text-banner.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/11\/Web-hosting_in-text-banner.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/11\/Web-hosting_in-text-banner.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/11\/Web-hosting_in-text-banner.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2><p>By modifying PHP settings on your web server, you may no longer encounter errors during file upload processes. This method lets you submit larger files to the web server by increasing the default limit for uploads. Alternatively, you can decrease it to reserve storage space.<\/p><p>If you have questions or other tips and tricks about this topic, leave them in the comment section below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you try running a script, plugin, or uploading large files to your website, you might encounter an error. One [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/tutorials\/php-maximum-upload-size\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":25,"featured_media":69236,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to Modify the PHP Max Upload Size in WordPress","rank_math_description":"Want to upload larger files but keep getting errors? See this tutorial showing how to modify the PHP maximum upload size in WordPress.","rank_math_focus_keyword":"php max upload size","footnotes":""},"categories":[22628,22630],"tags":[],"class_list":["post-748","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hosting","category-technical-aspects"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/php-maximum-upload-size","default":0},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/tutoriais\/como-aumentar-o-limite-de-upload-php","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/php-maximum-upload-size","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/php-maximum-upload-size","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/php-maximum-upload-size","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/pt\/tutoriais\/como-aumentar-o-limite-de-upload-php","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/php-maximum-upload-size","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/php-maximum-upload-size","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/php-maximum-upload-size","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/php-maximum-upload-size","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/748","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/comments?post=748"}],"version-history":[{"count":35,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/748\/revisions"}],"predecessor-version":[{"id":138151,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/748\/revisions\/138151"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/media\/69236"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/media?parent=748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/categories?post=748"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/tags?post=748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}