How to increase file upload size wordpress htaccess

To increase the upload file size in WordPress through the .htaccess file, you can add the following lines of code:

1. Locate and open the .htaccess file:

  • Access your WordPress installation files using an FTP client or via the file manager in your web hosting control panel.
  • Navigate to the root directory of your WordPress installation (the folder where WordPress is installed).
  • Find and open the .htaccess file in a text editor.

2. Add the code to the .htaccess file:

Add the following lines of code to the top or bottom of your .htaccess file:

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

This code sets the maximum upload file size to 64MB, the maximum post size to 64MB, the memory limit to 256MB, the maximum execution time to 300 seconds, and the maximum input time to 300 seconds. You can adjust these values to suit your needs.

3. Save and upload the .htaccess file:

  • Save the changes to the .htaccess file.
  • If you used an FTP client, upload the modified file back to the server, replacing the existing one.

After making these changes, your WordPress site should allow larger file uploads. If you still encounter issues, your hosting provider may have server-level restrictions, and you may need to contact them for further assistance.