How to increase the max file size to upload?

1. Create a file named php.ini in that file add the following code

.
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
2. Upload it in the root folder.
ex., wp/php.ini