Skip to main content
improved... everything... AGAIN!
Source Link
flomei
  • 1.1k
  • 1
  • 8
  • 23

This is not how it works. AllBasically all three files are taken into consideration.

WordPress/your server will check in the following order:

wp-config.php <> .htaccess <> php.ini

You can´t "overwrite" what is definedIf something on a higher level, so in your case the"higher level" .htaccess would be(later in the chain) is limiting factor.

Update: I was not really clear in my expressionyour value, let me improve itthe former value will be ignored or overwritten.

What I meant If a piece of the chain is missing, that you can not simply define athe value you like in wp-config.php and .htaccess or php.ini are then completely ignoredfor example, the next higher one will be used instead.

ActuallyIn your example the value from wp-config.php can be "overwritten" by a lower value in .htaccess orwould limit the php.inimax_upload_size to 64 MB, so depending onalthough your server configuration, your php.ini will set a limit you can´t breakwould be fine with up to 256 MB and WordPress would also accept up to 128 MB in file size first.

You can try toalso set a different limit via the .htaccess file and by doing this will workyou overwrite the value from php.ini, so that it is no longer the dominating value. This works in a lot of hosting environments as the servers, so chances are configured thatquite good you can raise or lower the max_upload_size in this way.

If you have a more strictly configured hosting/server, chances areit is possible that the option to override the settings from php.ini is disabled. IfIn this is the case, a pre-definedoverriding max_upload_size can´t be changed and you have tofrom .htaccess won´t work with what you got, so this could be a limiting factor.

This is not how it works. All three files are taken into consideration.

wp-config.php < .htaccess < php.ini

You can´t "overwrite" what is defined on a higher level, so in your case the .htaccess would be the limiting factor.

Update: I was not really clear in my expression, let me improve it.

What I meant is, that you can not simply define a value you like in wp-config.php and .htaccess or php.ini are then completely ignored.

Actually the value from wp-config.php can be "overwritten" by a lower value in .htaccess or php.ini, so depending on your server configuration, your php.ini will set a limit you can´t break.

You can try to set a different limit via the .htaccess file and this will work in a lot of environments as the servers are configured that way.

If you have a more strictly configured hosting/server, chances are that the option to override the settings from php.ini is disabled. If this is the case, a pre-defined max_upload_size can´t be changed and you have to work with what you got.

Basically all three files are taken into consideration.

WordPress/your server will check in the following order:

wp-config.php > .htaccess > php.ini

If something on a "higher level" (later in the chain) is limiting your value, the former value will be ignored or overwritten. If a piece of the chain is missing, the value in .htaccess for example, the next higher one will be used instead.

In your example the .htaccess would limit the max_upload_size to 64 MB, although your server would be fine with up to 256 MB and WordPress would also accept up to 128 MB in file size first.

You can also set a different limit via the .htaccess file and by doing this you overwrite the value from php.ini, so that it is no longer the dominating value. This works in a lot of hosting environments, so chances are quite good you can raise or lower the max_upload_size in this way.

If you have a more strictly configured hosting/server, it is possible that the option to override the settings from php.ini is disabled. In this case, overriding max_upload_size from .htaccess won´t work, so this could be a limiting factor.

improved... everything!
Source Link
flomei
  • 1.1k
  • 1
  • 8
  • 23

This is not how it works. All three files are taken into consideration.

wp-config.php < .htaccess < php.ini

You can´t "overwrite" what is defined on a higher level, so in your case the .htaccess would be the limiting factor.

Update: I was not really clear in my expression, let me improve it.

What I meant is, that you can not simply define a value you like in wp-config.php and .htaccess or php.ini are then completely ignored.

Actually the value from wp-config.php can be "overwritten" by a lower value in .htaccess or php.ini, so depending on your server configuration, your php.ini will set a limit you can´t break.

You can try to set a different limit via the .htaccess file and this will work in a lot of environments as the servers are configured that way.

If you have a more strictly configured hosting/server, chances are that the option to override the settings from php.ini is disabled. If this is the case, a pre-defined max_upload_size can´t be changed and you have to work with what you got.

This is not how it works. All three files are taken into consideration.

wp-config.php < .htaccess < php.ini

You can´t "overwrite" what is defined on a higher level, so in your case the .htaccess would be the limiting factor.

This is not how it works. All three files are taken into consideration.

wp-config.php < .htaccess < php.ini

You can´t "overwrite" what is defined on a higher level, so in your case the .htaccess would be the limiting factor.

Update: I was not really clear in my expression, let me improve it.

What I meant is, that you can not simply define a value you like in wp-config.php and .htaccess or php.ini are then completely ignored.

Actually the value from wp-config.php can be "overwritten" by a lower value in .htaccess or php.ini, so depending on your server configuration, your php.ini will set a limit you can´t break.

You can try to set a different limit via the .htaccess file and this will work in a lot of environments as the servers are configured that way.

If you have a more strictly configured hosting/server, chances are that the option to override the settings from php.ini is disabled. If this is the case, a pre-defined max_upload_size can´t be changed and you have to work with what you got.

Source Link
flomei
  • 1.1k
  • 1
  • 8
  • 23

This is not how it works. All three files are taken into consideration.

wp-config.php < .htaccess < php.ini

You can´t "overwrite" what is defined on a higher level, so in your case the .htaccess would be the limiting factor.