I ran into this error when I was uploading a new theme to my blog. The issue is that the default memory limit for uploads is 2 MB when you use the 1 click wordpress install from digital ocean. It’s really easy to increase it to something reasonable like 8 MB.
First, log into your server shell
then edit the config file for PHP
sudo nano /etc/php5/apache2/php.ini
look for this line:
upload_max_filesize = 2M
and change it to this:
upload_max_filesize = 8M
then press ctrl+x to close, and press Y at the prompt to save, then press enter to confirm.
now, restart apache to load in the new changes.
sudo service apache2 restart
and that’s it! you’re done.
Now you’re free to upload your larger themes and other files that wordpress would normally reject on digital ocean.
[…] post How to fix Digital Ocean WordPress “The uploaded file exceeds the upload_max_filesize directiv… appeared first on Hayk […]