Thursday, 3. June 2010 7:10
We’re new with cPanel, not sure if I like it yet, but just wanted to post my experience with moving a site from a standard LAMP stack server with a custom php config and no control panel to a cPanel server. We needed to increase the media upload limit for this site over the 5m that is set for the server in general.
First thing I learned, cPanel does not run php as a Apache module, so the current method of using a .htaccess file in the root folder of the site is just ignored when using a <IfModule mod_php5.c> directive or brings down the site if you are not… since php is not running as an apache module, it just ends up being a bad config.
First, make sure you have cPanel using suphp as the php handler, confirm by looking here:
Service Configuration >> Apache Configuration >> PHP and SuExec Configuration
So, my existing .htacces looked like this:
<IfModule mod_php5.c>
php_value upload_max_filesize 170M
php_value post_max_size 170M
</IfModule>
What you need to do is replace that with a php.ini file that looks like this:
upload_max_filesize = 170M
post_max_size = 170M
But you’re not done… I had to put a copy of this in both the root of the site and the wp-admin folder for it to work… I also read that some people had to put it into the actual folder in the wp-content folder to get it to work…
So, hopefully this will save somebody some time…