WordPress > Troubleshooting

2 minute read

How to change the max upload size for WordPress in php.ini


One of the most common errors that occurs in WordPress websites is the “maximum upload size exceeded” error. This issue can be resolved by increasing the max_upload_size in the php.ini file.

Several common errors in WordPress and other CMS websites like memory limit errors,upload size errors, upload limit errors etc. are resolved through php.ini(php sever configuration file).

Any changes made to php.ini can affects all other directories inside public_html folder unless the file is set as recursive. i.e; if you have any other domain directories inside your main directory then the changes are applied on them also.

For creating a phpinfo file in your cPanel please follow the below mentioned steps:

1) Login to your cPanel.

2) Scroll down to Files section and click on “File Manager” icon.

File Manager in cpanel

After clicking on File Manager you will be redirected to a page where a list of files and folders in your hosting account is visible on screen.

3) Now you need to navigate to public_html folder.

4) locate the php.ini file if it present or contact your Web hosting provider to upload php.ini file in your hosting account .

5) Select the php.ini file and click on edit to open it. Scroll down and find “max_upload_size” here.

6) After that you need to set the file_uploads “on” and after that set the file upload size according to your needs.
Note: We recommend you to set the upload limit upto 64M. This is the best size limit for everyone.

7) Now click on save button at the top right side to save the changes in php.ini file.

By follow the above mentioned steps you can set the upload file size according to your needs.