WordPress how to change upload size restriction for themes? (Ubuntu)
I can't install WordPress themes on my site because I'm using the WordPress demo plugin (to import the demonstration content on the site). I get the error: 500 internal server, it seems the file is too big to upload. How to fix it so I can upload the theme?
In your php setting files, there is a line that specifies the maximum upload for a file. You will need to edit this file while SSH'd into your Linode, then restart php. The default is 2 MB which is not that much, when you need to upload a theme.
To change the php settings:
2. You will need to find out your php version by running this command, the command will list the folders:
ls -la /etc/php
3. There will be a number in the previous command and replace the $number in the next command with it. The command will allow you to edit the file.
sudo nano /etc/php/$number/apache2/php.ini
4. Find the lines that starts with:
memory_limit = 24
upload_max_filesize = 24M
post_max_size = 32M
5. Edit the size to be larger than the upload size of your theme
6. Save the file
7. You will need to restart php or reboot your Linode for the changes to take affect. You can run the following command to restart php:
sudo systemctl restart php
Ubuntu has a great guide that should provide additional background information for reference.