Support » Localhost Installs » uploading size – due “hosting provider”

  • Resolved verbthierry

    (@verbthierry)


    Hey All,

    I installed WP on Ubuntu 20.04, but i came to the “common” known issue limit upload of 2M online I’ve found many tutorials one more detailed as the other but the results remain the same, I also installed a plugin (WP Maximum Upload File Size) to increase the size also this failed.

    the message I got from this plugin “Maximum upload file size, set by your hosting provider: 2MB”

    Now the server is local and no hosting provider is used.
    I did try to update the size in all the files i could find in “support” online but it still fails to get it higher then 2M

    files I’ve adjusted so far with the following setting;
    .htaccess
    php_value upload_max_filesize 64M
    php_value post_max_size 128M
    php_value memory_limit 512M
    php_value max_execution_time 300
    php_value max_input_time 300

    Functions.php
    @ini_set( ‘upload_max_size’ , ’64M’ );
    @ini_set( ‘post_max_size’, ’64M’);
    @ini_set( ‘max_execution_time’, ‘300’ );

    php.ini
    upload_max_filesize = 64M
    post_max_size = 64M
    memory_limit = 512M

    wp-config.php
    @ini_set( ‘upload_max_size’ , ’64M’ );
    @ini_set( ‘post_max_size’, ’64M’);
    @ini_set( ‘memory_limit’, ‘512M’ );

    these are currently the adjustments I’ve found so far.
    Are there any other ideas on how to adjust this upload size?

    *Already did a restart of the services and server itself, also clearing the browser of its cache did not help.

    I’m kinda surprised that this really can be an issue, and the WP did not provide a build in size increase in its admin panel.

    For reference I followed this guide “https://websiteforstudents.com/how-to-install-wordpress-on-ubuntu-20-04-18-04-with-nginx-and-lets-encrypt” for the complete installation of WP until the lets-encrypt part.

    Hope anyone can help.

    Kr,
    Thierry

    • This topic was modified 1 month ago by James Huff. Reason: moved to Localhost Installs since this is a localhost install

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Run a phpinfo() file from the root of your WordPress installation, and let’s see the value reported.

    For reference I followed this guide “https://websiteforstudents.com/how-to-install-wordpress-on-ubuntu-20-04-18-04-with-nginx-and-lets-encrypt” for the complete installation of WP until the lets-encrypt part.

    The link you gave talks about Nginx. Are you using Nginx or Apache? Note that .htacess rules are only for Apache — the file is totally ignored by Nginx (unless you’ve done the work to compile a custom Nginx module to support this).

    Thread Starter verbthierry

    (@verbthierry)

    Thanks for your reply,

    I’m indeed using the Nginx, I had to create the .htacess file (just wanted to try since the other solutions did not work).

    The phpinfo() can be found here.
    The phpinfo() still is at 2M. But some of other values did change.

    Kr,
    Thierry

    RossMitchell

    (@rossmitchell)

    You need to find the php.ini file that your webserver is using, and do the settings there.
    On my Ubuntu 20.04 system I did:
    sudo find / -name php.ini -ls
    which gave me two hits:
    /etc/php/7.4/cli/php.ini
    /etc/php/7.4/apache2/php.ini
    See what you find, make a safe copy of the files and make your changes.

    The 6th line of your phpinfo() dump gives me
    Loaded configuration file: /etc/php/7.4/fpm/php.ini

    Thread Starter verbthierry

    (@verbthierry)

    Dear,

    Thanks for the response.

    Indeed, I also found 2 .ini files.

    /etc/php/7.4/cli & /etc/php/7.4/fpm

    Toke a cp of both then compared the settings, the .ini file in the CLI folder did not had all the settings, so I’ve adjusted them without result. ( I know used diff stat to see what .ini file will adjust it on the phpinfo() but neither did.

    I did notice that the line above “enable_post_data_reading = off” was set as comment, I tried to set this “On” and removed the “;” before that line.
    But this did not fix the problem.

    I’ve uploaded both .ini files to this shared folder.

    Maybe u can see something I really did overlooked.

    Thanks,
    Kr,
    Thierry

    RossMitchell

    (@rossmitchell)

    Please remember that after changing the .ini file settings that you must restart the webserver. With apache this is:
    sudo /etc/init.d/apache2 graceful
    Or just reboot.

    Thread Starter verbthierry

    (@verbthierry)

    Dear,

    Thanks for the reply.

    The reboot I did, but did not work.

    However, the issue has been resolved.

    I copied a “default” php.ini file, adjusted the settings again.
    and after restart it was resolved. (the one in the FPM folder was the correct one to adjust)

    I did not compared the files yet. so can’t give more info on what else might been wrong.

    The clean copy I used came from inmotionhosting.com (found via google search)

    Thanks for the support.

    Kr,
    Thierry

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.