There are plenty of blog posts about 6 ways to change the upload size limit, i read them all. As usual there were little bits missing that someone like me needed to understand comletly what was needed.

So i thought i would add my own blog on my experience of increasing the upload size limit on my wordpress site

This wordpress site is part of multisite wordpress.

I have built it myself on a virtual machine from a hosting company. I rent a bare bones virtual linux machine with nothing on it

I then installed wordpress multisite with plugins and themes etc

So this might be differnt for you if you have purchased a prebuitl wordpress site

You will have less access to the underlying files

Because of the multisite install of wordpress ihave an extra setting for upload file size and file types

Changing this setting made no difference to the 2mb limit i was stuck with (until later)

Googling how to chnage the limit brought up a .htaccess method and a php.ini method

I teied the .htacess method but it stopped the media libary from loading fro some reason so i reverted the chnages back

Then i tried the php.ini method. The post i read however was not clear on where to find the php.ini file. It advised if i didnt have a php.ini file that you could create one

So off i went and created the php.ini file in the www folder of apache

This didnt work

So off to google i went

Then i found another post not related to wordpress about php and apache

How do i check what version of php i was using.

Well i remebered from installing word press that it created a file for you called info.php in your apache www folder

if you web browse to this file it will show you what version of php you are using and its location on the server

PHP7.4

As you can see it shows me php7.4 and its installed location

That is where you find php.ini and where you alter the upload size

I added these two line of text to the php.ini file and hey presto the upload size increased

post_max_size = 100M
upload_max_filesize = 100M

Not to 100mb though!

That was where i needed to go back and alter the upload size in the mutlisite settings (picture above)

Hope this helps someone like me who struggled to fill in the blanks between all the online posts about upload size limits for wordpress

Source
chown www-data:www-data -R * # Let Apache be owner
find . -type d -exec chmod 755 {} \; # Change directory permissions rwxr-xr-x

The above command will say you days

Finds all the directories and sets them as:

read,write,exec by user

read,exec by group and anon

find . -type f -exec chmod 644 {} \; # Change file permissions rw-r–r–

above command finds all the files and sets them to:

read,write by user

read only by group and anon

Source

useradd example – Add a new user to primary group

To add a user tony to group developers use the following command:
# useradd -g developers tony
# id tony

Sample outputs:

uid=1123(tony) gid=1124(developers) groups=1124(developers)

Please note that small g (-g) option add user to initial login group (primary group). The group name must exist. A group number must refer to an already existing group.

Continue Reading