• Resolved adamb001

    (@adamb001)


    I was wondering if you guys are familiar with any bluehost-specific issues. I’ve been going back and forth with their tier 2 support to no avail for 3 days now. They don’t use the .htaccess apparently, so I wonder if the process here would be different. What should we change exactly to make sure the plugin pulls the correct upload max file size?

    We tried following the instructions laid out in https://help.servmask.com/2018/10/27/how-to-increase-maximum-upload-file-size-in-wordpress/ but it doesn’t work. The current upload max, according to your plugin, is 64M.

    Thanks!

    -Adam

    • This topic was modified 7 years, 7 months ago by adamb001.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter adamb001

    (@adamb001)

    I just wanted to provide an update. Tier 2 support generated a phpinfo file that can be viewed and it shows that the upload max is 128M, but the plugin continues to show 64M as max.

    Plugin Author Yani

    (@yaniiliev)

    Hi @adamb001

    The plugin is using wp_max_upload_size().

    The source code of the function is as follows:

    function wp_max_upload_size() {
        $u_bytes = wp_convert_hr_to_bytes( ini_get( 'upload_max_filesize' ) );
        $p_bytes = wp_convert_hr_to_bytes( ini_get( 'post_max_size' ) );
     
        /**
         * Filters the maximum upload size allowed in php.ini.
         *
         * @since 2.5.0
         *
         * @param int $size    Max upload size limit in bytes.
         * @param int $u_bytes Maximum upload filesize in bytes.
         * @param int $p_bytes Maximum size of POST data in bytes.
         */
        return apply_filters( 'upload_size_limit', min( $u_bytes, $p_bytes ), $u_bytes, $p_bytes );
    }

    It will return the smaller value between upload_max_filesize and post_max_size. If both of these are set to 128M, it might be the upload_size_limit hook that changes the value for you. If that is the case, disable plugins one by one or change the theme to determine the source.

    We have bluehost hosting and the plugin works fine on it – you are probably missing something from the configuration or a plugin/theme is interfering.

    Thread Starter adamb001

    (@adamb001)

    Thanks for responding. I was able to make it work. the phpinfo.php file was displaying all the correct values, but wordpress kept saying a different max upload value. I had to create a .user.ini file in the directory where my wordpress was installed, and i added 2 lines:

    upload_max_filesize = 128M
    post_max_size = 128M

    For anyone facing a similar issue, you can change the 128M to whatever you need.

    Plugin Author Yani

    (@yaniiliev)

    Thank you for sharing your solution, @adamb001

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘bluehost max file upload issues’ is closed to new replies.