The average internet connection is getting faster and faster, so videos and large images are a good way to design your website.
However, WordPress websites are limited to a maximum media size of 2MB after installation. The solution: We increase the upload limit for your WordPress website through the PHP configuration.
The current maximum file size can usually be found here:
A photo exceeds the upload limit.
You can also see the current maximum file size under Tools -> Website Health.
Navigate to for this
/wp-admin/site-health.php, click there in the middle on the “Report” tab, select the “Server” tab. Here you can see the maximum file size when uploading, in addition to other useful information:
Maximum file size found via “Site Health” tool
But we’ll change that soon. Now I’ll show you what options there are to increase the upload limit in WordPress.
php.ini: The fastest way to increase the upload limit
In the root directory of your WordPress website there is the
php.ini File. All kinds of important configurations can be set in this, including all the necessary settings to increase the upload limit of your WordPress site.
So use the FTP tool of your choice to navigate to the directory mentioned, usually to be found under
/var/www/<eureSeite>. Then open it there
php.ini File or create it if it doesn’t already exist. Then you add the following values to increase the upload limit to 64MB:
upload_max_filesize = 64M post_max_size = 64M
Save the file and update your website health, now the website health tool should show:
The upload limit for WordPress has been increased to 64MB
functions.php: The easiest way to increase the upload limit
ATTENTION: With PHP 7.4 this method can be used no longer use, since the configuration of system variables via user scripts has been largely restricted.
The easiest way to increase your upload limit in WordPress is via the
functions.php of your child theme. Here we can define environment variables, which are evaluated when your website is loaded and registered by PHP.
It is important that you use a child theme and not just any installed theme. Because with these, any change would be overwritten with the next update. I’ll show you how to create a child theme here: Set up a child theme
With these simple two options, we can increase the upload limit for WordPress websites quickly and easily. If you want to know more just comment or reach me via contact.
Thank you for reading and see you next time!