The Uploaded File Exceeds The upload_max_filesize directive in php.ini

While trying to up load a theme to my WordPress site hosted I got the following error The uploaded file exceeds the upload_max_filesize directive in php.ini”. By default WordPress upload file size is 2 MB, and can cause problems even while trying to upload something so simple like a WP theme.

Here are the steps I took to resolve this issue:

1. Connect to your web host Via FTP. If you don’t know how to do this you can always contact your hosting provider and they will walk you through the steps to access the root directory where you have all the WordPress installation files.

2. Locate and access the wp-admin directory.

The Uploaded File Exceeds The upload_max_filesize directive in php.ini._1

3. Scroll down till you see a php.ini file inside the wp-admin folder. Before you edit this file make sure to create a back up by (dragging and doping the file to your desktop or on to a desktop folder).

The Uploaded File Exceeds The upload_max_filesize directive in php.ini._6-10

4. Once the backup is created, right click Edit the php.ini.

The Uploaded File Exceeds The upload_max_filesize directive in php.ini._3

5. Enter the following lines as shown:

upload_max_filesize = 64M;
post_max_size = 32M;

The Uploaded File Exceeds The upload_max_filesize directive in php.ini._4

Note: Do not delete any existing information within that file.

6. Now click on File and save to save the changes.

The Uploaded File Exceeds The upload_max_filesize directive in php.ini._5

7. If prompted checkmark  “Finish editing and delete local file” and Yes button to upload the edited php.ini.

The Uploaded File Exceeds The upload_max_filesize directive in php.ini._6

That is it you should be able to upload larger files without an issue.

In case there is no php.ini file within the wp-admin folder then you would need to create one.

To create a php.ini

1. Create a new text document.

The upload_max_filesize directive in php.ini

2. add the following lines:

upload_max_filesize = 64M;
post_max_size = 32M;

The upload_max_filesize directive in php.ini_2

3. Save the text doc. as php.ini

The upload_max_filesize directive in php.ini_3

The upload_max_filesize directive in php.ini_4

4. Once the php.ini is created upload it into the wp-admin directory. via FTP.

The upload_max_filesize directive in php.ini_5

Video Tutorial:

Leave a Reply