increase max upload size
wordpress

Increase Max file upload size in wordpress without plugin

WordPress is a popular content management system (CMS) that allows users to create and manage their own websites with ease. However, one of the common issues that users may face is the limitation on the maximum file size that they can upload. By default, WordPress has a maximum upload size limit of 2MB, which may not be sufficient for some users. In this blog, we will guide you through the process of increasing the maximum upload size in WordPress.

Step 1: Check the current maximum upload size limit

The first step is to check the current maximum upload size limit in your WordPress installation. To do this, log in to your WordPress dashboard and go to Media > Add New. You should see the maximum file size limit displayed at the bottom of the page. If it is set to 2MB, then you need to increase it.

Step 2: Edit the php.ini file

To increase the maximum upload size limit, you need to edit the php.ini file. This file is responsible for setting various PHP configurations, including the maximum file size limit. However, not all hosting providers allow access to the php.ini file. If your hosting provider does not allow access to the php.ini file, you can skip this step and proceed to step 3.

To edit the php.ini file, you need to connect to your server via FTP or cPanel File Manager. Once you are connected, navigate to the root directory of your WordPress installation and locate the php.ini file. If you cannot find the php.ini file, create a new file named php.ini in the root directory.

Add the following code to the php.ini file:

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

 

The code above sets the maximum file size limit to 64MB, the maximum post size limit to 64MB, and the maximum execution time to 300 seconds. You can adjust these values to suit your needs.

Save the php.ini file and close it.

Step 3: Edit the .htaccess file

If your hosting provider does not allow access to the php.ini file, you can increase the maximum upload size limit by editing the .htaccess file. This file is located in the root directory of your WordPress installation.

To edit the .htaccess file, connect to your server via FTP or cPanel File Manager. Once you are connected, navigate to the root directory of your WordPress installation and locate the .htaccess file. If you cannot find the .htaccess file, create a new file named .htaccess in the root directory.

Add the following code to the .htaccess file:

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

 

The code above sets the maximum file size limit to 64MB, the maximum post size limit to 64MB, and the maximum execution time to 300 seconds. You can adjust these values to suit your needs.

Save the .htaccess file and close it.

Step 4: Verify the changes Once you have made the changes to either the php.ini file or the .htaccess file, you need to verify that the maximum upload size limit has been increased.

To do this, log in to your WordPress dashboard and go to Media > Add New. You should see that the maximum file size limit has been updated to the value that you set.

Conclusion

Increasing the maximum upload size in WordPress is a simple process that can be done by editing either the php.ini file or the .htaccess file. However, if you are not comfortable editing these files, you should contact your hosting provider for assistance. By increasing the maximum upload size

Leave a Reply

Your email address will not be published. Required fields are marked *