Changing Max File Size

I found the directions on changing max upload file size but still don’t understand exactly what to do.

Part of the instructions are:

Type this into PUTTY
mkdir ~/[your website directory]/cgi-bin

What do I replace [your website directory] with in the above code if:

my main domain is:

and the subdomain I want to upload larger files to is:

I’m not grasping this. or do I replace it with /home/.kristen/(my user name)

Should it be in my root directory? which is what? I just don’t know what [your website directory] means. When I shell into my account, I’m in a directory outside of both my main domain folder and all of my subdomains. If Im following the above instructions, would it be:

mkdir ~/cgi-bin (skipping the [your website directory] part)

since my domain and subdomains are all in separate folders?

I wish there was an easier way to increase max php upload file size.

There rest of the directions are:

2/ Create a script to retrieve the latest copy of php.cgi and php.ini
Make a file in ~/ called containing the following, where 100M contains

For PHP5:

CGIFILE="$HOME/[your website directory]/cgi-bin/php.cgi"
INIFILE="$HOME/[your website directory]/cgi-bin/php.ini"
rsync -a /dh/cgi-system/php5.cgi “$CGIFILE”


cp /etc/php5/cgi/php.ini “$INIFILE”

perl -p -i -e ‘
s/.post_max_size./post_max_size = 100M/;
s/.upload_max_filesize./upload_max_filesize = 100M/;

Notice how in these lines it is set to 100M
You can change this to whatever you want, I had it set to 500m, and I successfully tested it with a 238MB file upload!

In PUTTY, if you are using a subdomain to host your aC installation, type
cd [your website directory]

Then type:
chmod +x

Create a file called .htaccess in your website directory:
Create the file ~/[your website directory]/.htaccess which contains the lines:

Options +ExecCGI
AddHandler php-cgi .php
Action php-cgi /cgi-bin/php.cgi

Type this into PUTTY

Open the newly-created script in your favorite text editor and DELETE these two lines:


cp /etc/php/cgi/php.ini “$INIFILE”

Then save


crontab -e

And then enter the following in the text editor that shows up (replacing ‘myusername’ with your specific username):

@weekly /home/[myusername]/

then hit CTRL-X, then ENTER

You are now ready to upload larger files!

all of that just to increase file size? Thanks for the help in advance. Just want to increase my max upload filesize and didn’t realize this extensive process was necessary.

You’ll have to do it in your subdomain since your subdomain is a separate website from your main domain.

mkdir ~/


Thanks for the quick reply : )

I’ll give it a go.

Just a quick update. It worked. I successfully uploaded a 10+ mb file to test it.

Thanks again for the directory help. : )