When you receive this error you will need to update upload_max_filesize = 2M and post_max_size = 8M which are the default values when installed.
In windows, follow these steps
1. First log in to your windows session.
2. Next navigate to c:program filesPhp
3. Then look for php.ini file
4. Press CTRL+F, type upload_max_filesize and press enter
5. Update the value 2m and change to the desired value. In this case i change to 100m which worked for me.
6. Next search for post_max_size, press enter
7. Change the default value from 8m to 100m
8. Save and close the php.ini file.
9. Try to upload file again.