In this tutorial, we will show you how to set limits to the PHP memory allocated for your WordPress website. The most common error you get after setting up a WordPress website on a Cpanel hosting is ‘ The uploaded file exceeds the upload_max_filesize directive in php.ini ‘.

This error occurs when you try to upload any plugin or theme via WordPress Admin panel but the size of that file is higher than the limitations set on your server.

This error can be solved in multiple ways. You need to access your Cpanel for that so make sure you have the credentials ready.

Method 1. Increasing the limit in php.ini file to Fix the upload_max_filesize error.

If you are using our managed services, you don’t have to worry about such errors, just open a support ticket if you are not able to fix it.

Other users can easily fix it by changing a few lines in your php.ini file.

Step 1. Login to your Cpanel account and then locate MultiPHP INI Editor in the Software tab.

Step 2. Open the MultiPHP INI Editor and select the domain / WordPress website for which you want to increase the limit.

Step 3. Change the upload_max_filesize value to a definite number as per your requirements.

That’s it, now go ahead and check out the upload limit in WordPress. This is the fastest and easiest fix you can do on a Cpanel Hosting.

Method 2. Increasing the limit in the wp-config.php File.

If the above method is not working for you, maybe you are not using a Cpanel hosting or you are not allowed to change the values in your Cpanel, you can always use this method to change the limit. This limit is also useful for people who are running VPS or a Dedicated Server.

In this method, you have to add a line at the end of your wp-config.php file. Just copy-paste the line given below before you see “That’s all, stop editing! Happy publishing” in your wp-config.php file.

@ini_set(‘upload_max_size’ , ‘256M’ );

See the image below for your reference.

Save the changes and you are good to go.

Method 3. Contact Technical support team to increase the limit.

You can contact your hosting provider to help you in increasing the upload limit, some hosting providers have blocked editing php.ini, in such cases, you can contact them to increase the limit.

If you are using Managed WordPress Hosting from HostItBro, you can easily open a support ticket to get this error solved.

Step 1. Login to your account.

Step 2. Click on Open Ticket option.

Step 3. Select Technical Support option.

Step 4. Fill the form and mention that you want to increase the upload limit for WordPress and then click on Submit.

Done! You’ll get a reply within a few minutes that the error has been solved and you can upload large files now.


In this tutorial, we explained to you how to solve the most common error ‘ The uploaded file exceeds the upload_max_filesize directive in php.ini ‘. Let us know if you are facing any issues while making any changes. If you don’t want to mess with your server configuration, you might want to consider HostItBro Managed Web Hosting Plans where everything is under control by trained SysAdmins.

Previous ArticleNext Article

Leave a Reply

Your email address will not be published.