KB ID 0001335 Dtd 24/07/17
Quite a few times after I rebuilt my server, (and WordPress site), I saw the following when uploading images etc.
I was quite sure everything was setup OK, I had set the max file upload limits set, but it turns out I needed to add a ‘memory limit’ in my wp-config.php file before the error ceased. For completeness I’ll include the other usual suspects, in case yours is setup a little differently from mine.
Edit Your php.ini File
Note: If you are running an earlier version of php, your path may be different.
sudo nano /etc/php/7.0/fpm/php.ini
Ensure the following has been set;
upload_max_filesize = 50M max_file_uploads = 20 post_max_size = 50M
Edit Your nginx.conf File
(Obviously don’t do this if you are running Apache!)
sudo nano /etc/nginx/nginx.conf
In the very bottom of the http section, (before the end ‘curly’ bracket ‘}’), add in the following;
Edit Your wp-config.php File
sudo nano /var/www/html/wp-config.php
Add the following to the very bottom of the file;
Related Articles, References, Credits, or External Links