Articles on: Website Creation
This article is also available in:

How to change the upload limit of a Wordpress Website ?

By default, WordPress sets a limit to the file size that can be uploaded to a site. This limit applies to media files, themes, plugins and everything else. In many cases, this limit is lower than your accommodation plan. You can therefore increase it to take full advantage of your Ex2 accommodation.

Steps to change the upload limit for a WordPress site via cPanel

Log in to your cPanel.

In the Files section, click the File Manager icon.

Go to public_html/wp-content/themes/thename/ . Of course, you must replace the ThemeName with the name of your current WordPress theme.

In this directory, find the file named functions.php.

Right-click the file name to open a drop-down menu. From there, select the Edit option.

A warning window will pop up for you to save. Click the Edit button to proceed to the next step.

Add the following lines of code at the bottom of the file and save the changes:

@ini_set( 'upload_max_size' , '128M');
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300');

Click the Save Changes button at the top right of your screen to save the changes to the file.


You can also increase the upload limit by using the .htaccess file instead.  

Moreover, if you set a value higher than that defined by your hosting plan, you will not benefit from it. The limit of your accommodation will then be applied. If you need to increase your upload limit, you may need to move to a higher hosting plan.

Updated on: 13/04/2023

Was this article helpful?

Share your feedback


Thank you!