Plz anyone can help me on how to fix this issue on WordPress “The uploaded file exceeds the upload_max_filesize directive in php.ini”. Whenever I install a theme, I get this error.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
If you restart apache after making the change: sudo service apache2 restart
It takes affect right away!
Right, you need to edit the file <code>/etc/php5/apache2/php.ini</code> and increase the setting for <code>upload_max_filesize</code> By default, it is only 2MB <br> <br>See: http://php.net/upload-max-filesize <br>
Find all php.ini files: root@server:~# find / -name php.ini /usr/local/vesta/php/lib/php.ini /usr/local/vesta/src/rpm/conf/php.ini /etc/php5/apache2/php.ini /etc/php5/cli/php.ini /etc/php5/cgi/php.ini
Edit the files: root@server:~# nano /usr/local/vesta/php/lib/php.ini
Use crtl + w for search for upload
Change this line: upload_max_filesize = 2M To: upload_max_filesize = 10M
Repeat for all files:
root@server:~# nano /usr/local/vesta/src/rpm/conf/php.ini root@server:~# nano /etc/php5/apache2/php.ini (this is probably the one you should change) root@server:~# nano /etc/php5/cli/php.ini root@server:~# nano /etc/php5/cgi/php.ini
Restart apache: root@server:~# sudo service apache2 restart