Php ini file location wordpress

I want to increase max execution time on my wordpress site. I know I should edit php.ini, but can't seem to find it!

any tips?

asked May 29, 2011 at 2:11

3

I see this question so much! everywhere I look lacks the real answer.

The php.ini should be in the wp-admin directory, if it isn't just create it and then define whats needed, by default it should contain.

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

answered Mar 17, 2015 at 14:56

Brad FletcherBrad Fletcher

3,4793 gold badges23 silver badges40 bronze badges

6

Wordpress dont have a php.ini file. It just a cms, look into your server. for example if you use XAMPP in windows xampp\php\php.ini is the location.

answered Mar 17, 2015 at 15:15

realhdxrealhdx

1511 silver badge3 bronze badges

1

I used this, very cool tool

//wordpress.org/plugins/php-settings/

This plugin provides a simple user interface with a code editor to edit your local .ini settings.

This can be used to change settings like upload_max_filesize or max_execution_time which are often set to very low values by the hosting companies.

Unheilig

16k193 gold badges67 silver badges96 bronze badges

answered May 24, 2017 at 0:08

5

Okay. Answer for self hosted wordpress installations - you'll have to find the file yourself. For my WordPres site I use nginx with php7.3-fpm.

Running php -i | grep ini from console gives me several lines including: Loaded Configuration File => /etc/php/7.3/cli/php.ini. This is ini configuration when running php command from command line, a.k.a. cli.

Then looking around I see there is also a file: /etc/php/7.3/fpm/php.ini I use FPM service so that is it! I edit it and THEN reload the service to apply my changes using: service php7.3-fpm reload.

That was it. Now I can upload bigger files to my WordPress. Good luck

answered Feb 18, 2020 at 10:58

kub1xkub1x

2,89435 silver badges36 bronze badges

2

Open .htaccess file in a code editor like sublime text and then add..

php_value upload_max_filesize 1000M
php_value post_max_size 2000M
php_value memory_limit 3000M
php_value max_execution_time 1800
php_value max_input_time 180

hope it helps..............it did for me.

answered Feb 3, 2018 at 22:08

3

Use the php_ini_loaded_file function to get the location of your php.ini file.

Chủ Đề