How to Increase PHP File Upload Limits Using htaccess in JuJu Hosting
If you need to allow larger file uploads on your JuJu Hosting account, you can achieve this by modifying your PHP settings using an .htaccess file. Here’s a step-by-step guide on how to do it:
If you need to allow larger file uploads on your JuJu Hosting account, you can achieve this by modifying your PHP settings using an .htaccess
file. Here’s a step-by-step guide on how to do it:
1. Log In to cPanel:
Start by logging into your cPanel dashboard. You can access it by visiting yourdomain.com:2083 (replace “yourdomain.com” with your actual domain) and entering your cPanel username and password.
2. Open File Manager:
Within cPanel, locate the “Files” section and select “File Manager.”
3. Navigate to Your Website’s Root Directory:
The File Manager will open in your website’s root directory. If you want to change the PHP settings for the entire website, navigate to the root directory (usually public_html).
4. Create or Edit .htaccess File:
In the File Manager, look for the “.htaccess” file. If you don’t see one, you can create a new one. Right-click on an empty space and choose “New File.” Name it “.htaccess” (without the quotes).
5. Edit .htaccess File:
Right-click on the .htaccess file and choose “Edit” or “Code Edit.” Add the following lines to increase the PHP upload limits:
# Increase upload limits
php_value upload_max_filesize 20M
php_value post_max_size 20M
php_value max_execution_time 300
php_value max_input_time 300
Adjust the values according to your requirements. These lines set the upload limit to 20MB, the maximum script execution time to 300 seconds, and the maximum input time to 300 seconds.
6. Save the .htaccess File:
After making your changes, save the .htaccess file.
7. Check Your Upload Limit:
To ensure that the changes have taken effect, upload a file exceeding the previous limit. You should be able to upload larger files without issues.
By using the .htaccess file, you can fine-tune the PHP settings for your specific directory or even for individual folders if needed. If you encounter any difficulties or have further questions, don’t hesitate to reach out to our JuJu Hosting support team for assistance. We’re here to help you make the most of your hosting experience.