How to fix Digital Ocean WordPress “The uploaded file exceeds the upload_max_filesize directive in php.ini”

1
3854
How To Fix Digital Ocean Wordpress “the Uploaded File Exceeds Th
How To Fix Digital Ocean Wordpress “the Uploaded File Exceeds Th

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

ssh [email protected]

then edit the config file for PHP

sudo nano /etc/php5/apache2/php.ini

look for this line:

upload_max_filesize = 2M

wordpress php memory config
wordpress php memory config

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.

I'm an entrepreneur who loves software and technology. Read some articles if you're interested about both.

1 COMMENT

  1. How to fix Digital Ocean WordPress “The uploaded file exceeds the upload_max_filesize directive in php.ini” – Hayk Saakian

    […] post How to fix Digital Ocean WordPress “The uploaded file exceeds the upload_max_filesize directiv… appeared first on Hayk […]

LEAVE A REPLY

Please enter your comment!
Please enter your name here