Home > Featured > Increasing PHP environment memory and file upload limits on Pair Networks virtual hosting
Bookmark and Share

Increasing PHP environment memory and file upload limits on Pair Networks virtual hosting

Posted on March 08, 2013 | Filed in Featured, PHP, Wordpress

Increasing the PHP environment memory and file upload limits on virtual hosting account is a common question. This is especially true when your working on a WordPress site and the file upload limit is restricted at 4MB.

This limit can be changed. There are several methods such using .htaccess, using a WordPress plugin etc. What works will depend on how your hosting environment is setup. This information applies to new Pair Networks hosting accounts but will also work with other hosting providers that allow personal php.ini settings.

On Pair Networks, if you have a fcgi-bin folder on your hosting account, then the following will work.

Create a file call “php.ini“.

It should look like this:

memory_limit = 64M
post_max_size = 32M
upload_max_filesize = 32M

Upload “php.ini” into the fcgi-bin folder.

Wait for about 10 minutes to an hour. As soon as all PHP sessions close, the hosting account will naturally re-start PHP.

If you absolutely must have the setting changes urgently, do this:

Connect to your account using SSH and kill the PHP process to force your changes to become effective.

kill -9 `ps auxww | grep php5.cgi | awk ‘{print $2}’`

You may get an error “No such process”. Ignore it.

There is one comment

  1. Rusty Shackleford says:

    This was a huge help!! Thank you!!

    The terminal command at the bottom to kill the PHP process didn’t work though. I got it to work with this small modification:

    kill -TERM `ps auxww | grep php5.cgi | awk '{print $2}'`

    Thanks again for this really helpful post!

Leave a Reply

Contact Us

Big Apple Design Group
134 West 29th Street
Third Floor
New York, NY 10001

[email protected]

Search Blog