Change upload max filesize for a Particular Domain

By default, PHP limits file uploads based on the upload_max_filesize directive. Sometimes, you need to increase this limit for a particular domain rather than changing it globally. In Ensim, you can update this setting using the shell as a root user.

This guide will show you how to change the PHP upload_max_filesize for a particular domain in Ensim step by step.

Steps to Change upload_max_filesize for a Domain

1: Run the Command
Use the following command to set the new upload size limit (here, 20MB is an example):
echo “php_admin_value upload_max_filesize 20MB” > /etc/httpd/conf/sitexx/uploadmaxsize

2: Replace Site Number
In the above command, replace xx with your actual site number.

3: Find the Site Number
Run the following command to identify the correct site number:
sitelookup -d yourdomain.com

4: Restart Apache
After making the change, restart Apache for the new configuration to take effect:
service httpd restart.

Pro Tip:

If you need different limits for multiple domains, repeat the process for each domain with its site number. Always ensure you don’t set the limit higher than your server’s available memory.

Popular Posts You May Read

Explore more hosting insights, tips and industry updates.

Steps To Add Your Credit Card To Your PayPal Account

This tutorial assumes you are already logged in to PayPal. Click on the profile link.…

Why We Do Not Provide ‘Unlimited’ Hosting Plans

‘Unlimited’ web hosting is impossible. Many companies claim to offer just that, but this is…

How to Fix Node.js 'Cannot GET URL' Error Quickly

How to Fix Node.js ‘Cannot GET URL’ Error Quickly

This guide will illustrate how to resolve the Node.js error: “Cannot GET” URL. First, let’s…