Increase the size of uploaded images in WordPress Website


Increase the size of uploaded images in WordPress Website - WordPress is a powerhouse with loads of skins, plugins that agree to you create any type of website. From e-commerce to the website, WordPress protects you. However, when choosing web hosting for WordPress, you should consider performance, security and support from the beginning.

You are Create website If WordPress hosts a portfolio with a large image file or a video hosting website with a single media file size that runs up to GB, then you will face the barrier of not being able to upload media files larger than 25MB.

Error 500 Internal Server almost always appear most timely, users suddenly find a way to get WordPress website online.

By default, the maximum upload size at WordPress ranges from 2MB to 150MB depending on the setting from the web hosting provider by default.

To check what the maximum upload size limit is currently on the WordPress website, then navigate to WP Admin → Media → Add new. You will see the current maximum upload size at the bottom as screenshot.


WordPress increases upload size

If the current maximum upload size limit meets your needs, leave it as is. However, if not then do not fret, there are many ways you can increase the maximum upload size at WordPress. I will highlight in this tutorial.

Note: Instructions are written to provide all solutions. However, some do not work in most web hosting. Here, the best solution is to contact the hosting service provider.

  1. Update the .htaccess file

When the web owner is using Apache, PHP places the Apache module, then you add a few lines of code in the WordPress .htaccess file to increase the maximum upload size at WordPress.

To access the .htaccess file, connect to the server via the FTP client and navigate to the WordPress installation directory. Open the .htaccess file in the code editor or Notepad or add the following line.

php_value upload_max_filesize 64M

php_value post_max_size 128M

Memory php_value_limit 256M

php_value max_execut_time 300

php_value max_input_time 300

This will determine the maximum upload size in Megabytes. Replace numbers as required. Maximum execution time with maximum input time in seconds. The execution time determines the time limit for the script. Choose the number that fits the website.

  1. Edit the Ham.php file

In some cases, you may not be able to access the .htaccess file, or you will be better able to edit the WordPress interface file.

Easily increase the size limit by adding the following line of code at the interface file functions.php.

However, remember that if you change the interface, the maximum upload size will return to the default value until you edit the new interface.php file.

@ ini_set (‘upload_max_size’, ’64M’);

@ ini_set (‘post_max_size’, ’64M’);

@ ini_set (‘max_execut_time’, ‘300’);

See more: Analyze the competitor's website

  1. Php.ini options

This is the default file used to configure any application that runs in PHP. This file contains the required file timeout, upload size, and resource limits. Access the WordPress root directory with SSH or FTP and find the php.ini file. In some cases, this file is not displayed with another option will be to create a new file instead.

Open any text editor and then create a new file. Copy the code and save it as php.ini.

upload_max_filesize = 25M

post_max_size = 13M

memory_limit = 15 million


About My name is Nguyen Manh Cuong. I was born in a poor village in Ba Vi district, HA NOI province - windy and sunny land. Currently. Mr Cuong.
Newer Posts Newer Posts Older Posts Older Posts


Post a Comment