How to Increase the Maximum Upload Limit in WordPress

Have you ever tried to upload a new theme, image or video to your site only to get the error, The uploaded file exceeds the upload_max_filesize directive in php.ini?

Yep, it can be annoying, especially if you’re building a photography, videography or portfolio site that needs to use large file sizes.

Luckily, it’s an easy fix and in today’s WordPress Weekend Project I’m going to show you how to say goodbye to this error message.

There are a few steps you can try to increase the upload limit:

1. Edit your php.ini file. Find – or add/create your own – the php.ini file in the root of your site and the line beginning with memory_ limit and replace the value with the memory limit you require.

memory_limit = 256M;

2. Edit your .htaccess file. Add the line php_value_memory_limit and change the memory limit to what you need.

php_value memory_limit 256M;

Replace “256″ with the memory limit you need.

3. Edit your wp-config.php file. If you PHP supports it, you can add the following line:

define('WP_MEMORY_LIMIT', '256MB');

Replace “256M” with your own required memory limit.

Depending on your web host, these steps might not work so it’s best to contact them if you have any issues.

You can also upload larger files directly to your site using FTP if you don’t want to mess around with editing files.

Leave a Comment