简体   繁体   中英

Wordpress PHP.INI nightmare

I tried uploading a theme and i got the error

'The uploaded file exceeds the upload_max_filesize directive in php.ini.'

First, I couldn't find a php.ini file, then I sought help and I was told to create it which I did and also edited. Till date, Nothing has changed. Same error. I created the php.ini file in the public_html directory, no luck. In the public_html/wp-admin directory, no luck as well. Please help. Thanks.

php.ini is the core configuration of PHP. It's located on the server. You can change upload_max_filesize from php.ini files.

If you don't have the access of php.ini files then you can create a .htaccess file (not needed if already have) in the project directory. Because .htaccess the file can overwrite the main php.ini config.

After create .htaccess put the following line in .htaccess

php_value upload_max_filesize 100M
php_value post_max_size 100M 

Note

If you have cPanel access, many cPanel provide the opportunity to change the upload_max_filesize from cPanel configuration.

Hope it will help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM