How to Change the Maximum Upload File And Post Limit on Open Litespeed WordPress – Having trouble uploading files to your WordPress site due to size limitations? If that’s the case, you’ve come to the right place. In this article, we will show you how to increase the size limit by changing the PHP maximum upload size.
Why Do You Need to Change the Maximum Upload Size Limit?
The standard maximum upload size on WordPress may vary depending on your hosting provider. Usually, the size is from 5 to 128 MB.
Usually, 128 MB is sufficient if you only need to upload a short video or image. However, if you want to upload a longer video, you may need to increase the maximum upload size.

That’s doubled if your maximum upload size is only 5 MB. You will not be able to install themes or plugins, considering that most plugins currently exceed 5 MB.
On the other hand, if the size limit is set too large, other people may upload large files that take up a lot of your storage space. In this case, you may want to reduce PHP’s maximum upload size to prevent that from happening.
How to Change Maximum Limit Upload Size for PHP Scripts?
In most cases, you can change PHP’s maximum upload size by editing a file called php.ini. However, if you’re on a Hostinger shared hosting plan, you don’t have access to those files. Instead, you are allowed to configure most PHP values from the .htaccess file.
Do The Following Steps:
-
- Navigate to the File Manager in your cPanel, open the public_html folder, and locate the .htaccess file.

Cpanel for htaccess - Open the .htaccess file. and put the following code above the #END WordPress line.
- Change “XX” to the size you want. However, note that post_max_size must always be greater than upload_max_filesize to avoid uploading errors. For example, if you set upload_max_size to 356 MB, then post_max_size must be 357 MB or more.
- Once you are done, click Save & Close.
- Navigate to the File Manager in your cPanel, open the public_html folder, and locate the .htaccess file.
php_value upload_max_filesize XXM
php_value post_max_size XXM
You can also edit the .htaccess file via an FTP client like Bitvise
Checking Maximum PHP Upload Size Limit
After changing your PHP maximum upload size, we need to check the current size limit with the phpinfo() function to make sure that it has changed.
Just create a new PHP file in the public_html directory of your WordPress site and enter the following code:
You can name the file whatever you want. In this case, we named it phpinfo.php.
To access the file we just created, simply ad/phpinfo.php at the end of your site’s domain (http://yoursite.com/phpinfo.php).

You will see two columns – local value and master value. Local value is set in .htccaccess and replaces the master value, which is set in php.ini. Therefore, don’t care about the master value and look for the local value for upload_max_filesize and post_max_size As a replacement.
If the local values of both parameters are the same as the ones you set earlier, then you have successfully changed the PHP maximum upload size for your WordPress site.
What Is Open Litespeed WordPress PHP7.4, WordPress What Is It?
LiteSpeed Cache for WordPress (LSCWP) is a full site acceleration plugin, featuring exclusive server-level cache and a set of optimization features.
LSCWP supports WordPress Multisite and is compatible with the most popular plugins, including WooCommerce, bbPress, and Yoast SEO.
LiteSpeed Cache for WordPress is ClassicPress compatible.

Here are the features of this Litespeed Cache:
- Free QUIC.cloud CDN cache
- Object Cache Support (Memcached / LSMCD / Redis) +
- Image Optimization (Lossless / Lossy)
- Minimize CSS, JavaScript and HTML
- Minimize inline CSS/JS
- Combine CSS/JS
- Generate Critical CSS automatically
- Reload image/iframe
- Responsive Image Placeholders
- Multiple CDN + Support
- Load CSS/JS Asynchronously
- Browser Cache Support +
- Database Cleaner and Optimizer
- PageSpeed score optimization
- OPcode Cache Support +
- HTTP/2 Push for CSS/JS (on a web server that supports it)
- DNS Prefetch
- Cloudflare API
- Single Site and Multisite (Network) Support
- Import/Export settings
- Attractive and easy to understand interface
- WebP image format support
- Heart rate control
You can check the complete information about Litespeed Cache here: https://wordpress.org/plugins/litespeed-cache/
How How to Change the Maximum Upload File And Post Limit on Open Litespeed WordPress PHP7.4
For the example in this discussion, the admin uses PHP7.4 Default from Open Litespeed WordPress
then the server that is suitable and very supportive for this Litespeed Cache feature is DigitalOcean
- Updates post_max_size and upload_max_filesize value from
/usr/local/lsws/lsphp73/etc/php/7.4/litespeed/php.ini
- Make sure the PHP version first, check info.php
then search (CTRL + F) search for upload_max_filesize and post_max_size - Edit file upload_max_filesize = xxxxM edit xxxx, adjust the size you want
post_max_size = xxxxM edit xxxx adjust the size you want - Then Save (CTRL + S)
- Finally you have to restart the server via putty or bitvise ssh with the following command:
service lsws restart && killall lsphp
Easy isn’t it, it’s fun to share How to Change the Maximum Upload File And Post Limit on Open Litespeed WordPress PHP7.4
Popular Search
How to Make Upload File Size Limitation in this php-