I am unable to upload a new theme in wordpress.The maximum limit showing right now is 10 mb. What changes should I make in CPanel. I have created a new file in Public_html named php.ini.
and pasted these lines.
upload_max_filesize = 256MB
post_max_size = 32M
memory_limit = 32M
max_execution_time = 300
3
Answers
1: Theme Functions File
There are cases where we have seen that just by adding the following code in theme’s functions.php file, you can increase the upload size:
2. Create or Edit an existing PHP.INI file
For this method you will need to access your WordPress site’s root folder by using FTP or File Manager app in your hosting account’s cPanel dashboard.
In most cases if you are on a shared host, then you will not see a php.ini file in your directory. If you do not see one, then create a file called php.ini and upload it in the root folder. In that file add the following code:
This method is reported to work for many users. Remember if 64 doesn’t work, then try 10MB (sometimes that work).
3. htaccess Method
Some people have tried using the .htaccess method where by modifying the .htaccess file in the root directory, you can increase the maximum upload size in WordPress. Edit the .htaccess file in your WordPress site’s root folder and add the following code:
Using .htaccess file in wordpress. You can define below lines,
Open it .htaccess in folder and added the following into a newline at the end of the file.
Save your changes and overwrite the .htaccess file.
Get More info, you can follow the link,
For upload file size: https://www.bitcatcha.com/blog/increase-maximum-upload-file-size-in-wordpress/
For Increase Memory Limit size :https://premium.wpmudev.org/blog/increase-memory-limit/
you can create php.ini file in wp_admin folder in root wordpress directory