How to Change the Maximum File and Post Upload Limits on Open Litespeed WordPress PHP7.4 – For those of you who are having problems with very large file capacities uploading on the WordPress site, here's how to change the maximum upload file limit and a post on open litespeed WordPress PHP7.4 which can help you shrink file size.

Why Need to Change Maximum Upload Size Limit?

The standard maximum upload size on WordPress can vary depending on your hosting provider. Typically, they range from 5 to 128 MB in size.

Usually, 128 MB is enough if you only need to upload short videos or images. However, if you want to upload longer videos, you may need to increase the maximum upload size.

Maximum upload file size wordpress
Maximum upload file size WordPress

That goes double if your maximum upload size is just 5 MB. You won't be able to install themes or plugins, considering that most plugins are currently over 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 the maximum PHP upload size to prevent that from happening.

How to Change the Maximum Upload Size Limit for PHP Scripts?

In most cases, you can change the maximum PHP upload size by editing the file called php.ini. However, if you are on a Hostinger shared hosting plan, you will not have access to those files. Instead, you are allowed to configure most PHP values from the .htaccess file.

Do the Following Steps:

    1. Navigate to File Manager in your cPanel, open the public_html folder, and find the .htaccess file.
      Cpanel for htaccess
      Cpanel for htaccess
    2. Open the .htaccess file. and enter the following code above the line #END WordPress.
    3. Change “XX” to the size you want. However, note that post_max_size must always be larger than upload_max_filesize to avoid errors when uploading. For example, if you set upload_max_size to 356 MB, then post_max_size should be 357 MB or more.
    4. When you are done, click Save & Close.

php_value upload_max_filesize XXM

php_value post_max_size XXM

You can also edit the .htaccess file via an FTP client such as Bitvise

Checking Maximum PHP Upload Limit Size

After changing your PHP maximum upload size, we need to check the current size limit with the phpinfo() function to ensure that it has changed.

Simply create a new PHP file in your WordPress site's public_html directory and enter the following code:

info. php




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 (

php info uload max file size

You will see two columns – local value and master value. Locale value is set in .htcaccess and overrides the master value, which is set in php. ini. Therefore, ignore the master value and look up 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 you previously set, then you have successfully changed the maximum PHP upload size for your WordPress site.

What is Open Litespeed WordPress PHP7.4?

LiteSpeed ​​Cache for WordPress (LSCWP) is a complete site acceleration plugin, featuring a proprietary server-level cache and optimization feature set.

LSCWP supports WordPress Multisite and is compatible with the most popular plugins, including WooCommerce, bbPress, and Yoast SEO.

LiteSpeed ​​Cache for WordPress is compatible with ClassicPress.

How to Change the Maximum File and Post Upload Limits on Open Litespeed WordPress PHP7.4

Following are the features of this Litespeed Cache:

  1. Free CDN cache
  2. Object Cache (Memcached / LSMCD / Redis) + support
  3. Image Optimization (Lossless / Lossy)
  4. Minimize CSS, JavaScript, and HTML
  5. Minimize inline CSS / JS
  6. Combine CSS / JS
  7. Generate Critical CSS automatically
  8. Reload image/iframe
  9. Responsive Image Placeholders
  10. Multiple CDN+ Support
  11. Load CSS/JS Asynchronously
  12. Browser Cache Support +
  13. Database Cleaner and Optimizer
  14. PageSpeed score optimization
  15. OPcode + Cache Support
  16. HTTP/2 Push for CSS/JS (on web servers that support it)
  17. DNS Prefetches
  18. Cloudflare APIs
  19. Single Site and Multisite (Network) Support
  20. Import / Export settings
  21. Attractive and easy to understand interface
  22. WebP image format support
  23. Heart rate control

How How to Change the Maximum File and Post Upload Limits 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 really supports the Litespeed Cache feature is DigitalOcean

  1. Updates post_max_size and upload_max_filesize value from


  2. Make sure the PHP version first, check info.php
    then search (CTRL + F) look for upload_max_filesize and post_max_size
  3. Edit files upload_max_filesize = xxxxM , edit xxxx according to the desired size
    post_max_size = xxxxM edit xxxx according to the size you want
  4. Then Save (CTRL + S)
  5. Finally you have to restart the server via putty or bitvise ssh with the following command:

service lsws restart && killall lsphp


Below we have summarized some frequently asked questions about file uploads, as follows:

What is the Default File Size Set in Upload_max_filesize?

To set the file upload size, select upload_max_filesize then click on the available size. By default, the file size is 2 M which can be interpreted as 2 MB. You can adjust the capacity of the file upload size you want.


This is information about how to change the maximum upload limit for files and posts on open litespeed wordpress PHP7.4, I hope the above article can be useful and helpful for all of you.

Back to top button