Skip to content
Technology for businesses since 2008

Help center · WordPress

Fix the upload_max_filesize error in php.ini on WordPress

How to Fix the Error: the uploaded file exceeds the upload_max_filesize limit in php.ini on WordPress

Introduction

If you have run into the error “the uploaded file exceeds the upload_max_filesize limit in php.ini” while trying to upload files to WordPress, you know how frustrating it can be. This problem is common on WordPress installations in cPanel environments with CloudLinux, and it can be easily resolved by following a few simple steps. In this article, we will show you how to fix this error and increase the upload limit on your WordPress site.

  1. Identifying the problem

The error “the uploaded file exceeds the upload_max_filesize limit in php.ini” occurs when you try to upload a file whose size is larger than the upload limit set in your server’s php.ini configuration file. This can happen when you try to install a theme or plugin, or upload media.

  1. Accessing cPanel

To fix this error, you need to access your hosting’s cPanel. cPanel is a graphical interface that makes it easy to manage your web server and PHP settings.

  1. Locating “Select PHP Version”

Inside cPanel, look for the option “Select PHP Version” (or something similar, depending on your hosting provider). This option lets you adjust the PHP settings for your site.

  1. Adjusting the PHP settings

Click “Select PHP Version” and you will be redirected to a page where you can change the PHP settings. Look for the following options:

  • upload_max_filesize: the maximum file size that can be sent to the server.
  • post_max_size: the maximum amount of data that can be sent through the POST method.

Increase the value of these two settings to the size you need, for example, 64M or 128M. Keep in mind that raising these values too much can cause performance problems on your server.

  1. Saving the changes

After adjusting the settings, click “Save” or “Apply,” depending on your cPanel interface. The changes take effect immediately, and the upload limit for your WordPress site will be updated.

  1. Testing the new upload limit

Now that you have raised the upload limit, try uploading the file again on your WordPress site. If the error persists, check that the settings were applied correctly and that the file size is within the new limit.

Conclusion

Fixing the error “the uploaded file exceeds the upload_max_filesize limit in php.ini” in WordPress is a simple and quick process. By following the steps described in this article, you can raise the upload limit and avoid future problems when installing themes, plugins, or uploading media to your site. Remember to monitor your server’s performance after making these changes, to make sure everything keeps working correctly.

More on WordPress

See all →

Help center

Looking for something else?

See all tutorials, organized by topic.