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.
Video Tutorial:
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.
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).
4. Once the backup is created, right click Edit the php.ini.
5. Enter the following lines as shown:
upload_max_filesize = 64M;
post_max_size = 32M;
Note: Do not delete any existing information within that file.
6. Now click on File and save to save the changes.
7. If prompted checkmark “Finish editing and delete local file” and Yes button to upload the edited php.ini.
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.
2. add the following lines:
upload_max_filesize = 64M;
post_max_size = 32M;
3. Save the text doc. as php.ini
4. Once the php.ini is created upload it into the wp-admin directory. via FTP.