skip to Main Content

After being fed up with Godaddy hosting, I am trying to migrate my site to Azure VM. I am stuck at maximum file upload size limit which is fixed at 40 MB, while my site backup file is around 850 MB.
Adding below lines in .htaccess file through WP File Manager didn’t work. No luck with restarting VM too.

php_value upload_max_filesize 512M
php_value post_max_size 512M
php_value memory_limit 256M
php_value max_execution_time 300
php_value max_input_time 300

Is there some workaround to increase size of file upload? How do I see site files? I feel CPanel’s File Manager was pretty good and straight forward.

2

Answers


  1. Chosen as BEST ANSWER

    Uploading .user.ini file with below content to htdocsfolder fixed the issue. Make sure to use Advanced File manager plugin to upload the file. Other Wordpress file managers don't allow files that start with dot.

    memory_limit=256M
    upload_max_filesize=1024M
    post_max_size=1024M
    max_execution_time=300
    max_input_time=300
    

    enter image description here


  2. In case someone is still reading this. The default Azure WebApp allows 8MB upload. To increase to 64MB, I did the following.

    In .user.ini in /site/wwwroot I added.

    memory_limit = 256M
    post_max_size = 76M
    upload_max_filesize = 64M
    

    In web-config.php I added.

    define('WP_MEMORY_LIMIT', '1024M');
    

    I am using Project Nami WordPress on an IIS server so I had to do add the following to web.config.

      <security>
         <requestFiltering>
            <requestLimits maxAllowedContentLength="67108864"/>
         </requestFiltering>
      </security>
    

    Then rebooted the web app in the Azure portal.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search