There are several ways to increase WordPress upload capacity. For one, WordPress comes with a feature to upload files. This feature makes it easy to upload files, so you don't need an FTP or File Manager. All the files you want to post to your blog can be easily uploaded with just a few buttons.
However, this upload feature uses PHP to initiate the process of uploading files to the server. Unfortunately, there is a maximum file size limit imposed. You can check the file upload limit on the WordPress Admin Dashboard > Media > Add New.
The limit may vary depending on your hosting and WordPress configuration. Generally, file upload limits are fine for regular WordPress users. However, sometimes you'll see the error message ...exceeds the maximum upload size for this site when trying to upload large video and PDF files.
There are a few different ways to increase upload file size in WordPress. In this tutorial, we'll cover them one by one.
What do you need?
Before starting the steps in this tutorial, make sure that you have:
- Access to control panel hosting
- Access to dashboard admin WordPress
Here's how to increase wordpress upload capacity
Step 1: Through the .htaccess file
Many hosting providers allow you to change PHP settings through the .htaccess file. You can add the php_value upload_max_filesize to the .htaccess file to increase the upload limit of this PHP file.
1. In this tutorial we will use File Manager to edit the .htaccess file. Alternatively, you can also use FTP. The .htaccess file itself is in the same directory as the WordPress files (if your website uses WordPress).
For example, if you access your blog through the domainanda.com address, the WordPress and .htaccess files are located in the public_html folder.
2. Once you have found the .htaccess file, right-click on the file then select the Edit menu.
3. After that, please add the code below on the bottom line.
php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_time 300
4. Setelah kode Anda letakkan di sana, klik tombol Save Changes untuk menyimpan perubahan.
Step 2: Configuration of php.ini File
[ecko_alert color="gray"]IMPORTANT: This method is appropriate for VPS users Your WordPress is on a VPS. Most shared hosting services currently do not allow users to edit the php.ini file. If you are using shared hosting, please ask if you can make changes to the php.ini file."[/ecko_alert]
If the .htaccess file does not work, you can change the upload limit value via the php.ini file. You can access the php.ini file via File Manager in the hosting control panel, FTP, or SSH (if your hosting supports SSH) in the main directory. If you don't find the file, please create a new php.ini file and enter the code below:
upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 300
Once you're done, save the file and go to your WordPress admin dashboard, then choose Media > Add New to see the changes.
Step 3: Change the Maximum File Upload Size in cPanel
If your hosting service uses cPanel and allows users to change PHP settings, you can easily increase the maximum file upload size.
1. Please access cPanel and select the Select PHP version menu in the Software column.
2. Please click the Switch To PHP Options link.
3. Please change the post_max_size and upload_max_filesize values. Adjust them according to the file you are going to upload.
4. After that, please click the Save button to save the changes.
Step 4: Edit File wp-config.php
If the three ways to increase wordpress upload capacity above don't work for you, you don't have to worry. There are other ways to increase the upload limit on WordPress.
You can add the following line of code to your wp-config.php file.
define('WP_MEMORY_LIMIT', '128M');
To access the file, please use File Manager or FTP. The file location is usually in the same directory as the main website directory. Please add the above line of code to the final line of code as seen in the image below.
Conclusion
After completing the tutorial on how to increase WordPress upload capacity, you should now be able to solve the problem of uploading large files.