Rancakmedia.com – 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.
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:
- Navigate to File Manager in your cPanel, open the public_html folder, and find the .htaccess file.
- Open the .htaccess file. and enter the following code above the line #END WordPress.
- 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.
- When you are done, click Save & Close.
php_value upload_max_filesize XXM
php_value post_max_size XXM
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:
<?php phpinfo(); ?>
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. 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.
Following are the features of this Litespeed Cache:
- Free QUIC.cloud CDN cache
- Object Cache (Memcached / LSMCD / Redis) + support
- Image Optimization (Lossless / Lossy)
- 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 web servers that support it)
- DNS Prefetches
- Cloudflare APIs
- Single Site and Multisite (Network) Support
- Import / Export settings
- Attractive and easy to understand interface
- WebP image format support
- 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
- Updates post_max_size and upload_max_filesize value from
- Make sure the PHP version first, check info.php
then search (CTRL + F) look for upload_max_filesize and post_max_size
- 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
- 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
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.