How can I find my php.ini on 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?

Answers


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

I used this, very cool tool

https://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.


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.


A php.ini file is not installed by default with Wordpress. You may have one already installed by your web host. Look in your root directory or ask your web host or read your web host's documentation on how to install one.

Look for max_execution_time in your php.ini file and change to 60 or 90


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.


This Worked For Me. I have installed wordpress in godaddy shared server. Open .htaccess file using editor and add the following from the first line,

#  BEGIN Increases Max Upload Size
php_value upload_max_filesize 20M
php_value post_max_size 20M
php_value max_execution_time 300
php_value max_input_time 300
#  END Increases Max Upload Size

This solved the php.ini issues for me in the server.


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

<?php
$inipath = php_ini_loaded_file();

if ($inipath) {
    echo 'Loaded php.ini: ' . $inipath;
} else {
    echo 'A php.ini file is not loaded';
}

If you have access to our webroot, create a file asdf.php with

<?php phpinfo(); ?>

in it and point your webbrowser to it. You should see all info in the first section.

  • Configuration File (php.ini) Path
  • Loaded Configuration File
  • Scan this dir for additional .ini files
  • Additional .ini files parsed

This works for any php application and is therefore the universal way to find our php.ini


Create a file yourself php.ini anywhere in your root or wp-admin folder and add the necessary code to the file it should work


If your hosting provider is using Plesk, go to Websites & Domains > PHP settings from where you can seamlessly change memory_limit, max_execution_time, max_input_time, etc. Hope it helps.


If you use cPanel and have installed CloudLinux you can go to section Software > Select PHP Version > Switch To PHP Options and define max_execution_time among other options.

Short gif: http://cloud.mercadoalvo.com/nDdE


I just came across this thread while searching for an answer to why the php.ini file would be within the /wp-admin/ folder for WordPress that I have just seen in an odd setup - because it really really shouldn't be there.

WordPress by default doesn't include a php.ini file within the /wp-admin/ folder, so you should not have one there yourself. The php.ini file is designed to override the main server PHP configuration settings so that your account on the server is treated differently, within limits. As such, if you do need to use this file, please, for your own sanity (and that of others who happen to work with your systems in the future...), place the php.ini file in the root of your account, not hidden away in the /wp-admin/ folder, or any other folder for that matter.

I'm surprised to see so many others commenting that it should be in the /wp-admin/ folder to be honest. I'd love to see some official documentation from WordPress stating that this is best practice, as this is certainly something that I would completely avoid.


you can do it from the Cpanel: 1.- CPANEL 2.- Select PHP Version 3.- Swich to PHP options 4.- Edit:

max_execution_time 1800 max_input_time 64 max_input_vars 6000 memory_limit 512M post_max_size 128M upload_max_filesize 128M


The name of the custom ini file depends on the user_ini.filename php setting. By default this should be .user.ini and the custom configuration files are used on a per-directory basis, so you should be able to either put it in the root of your Wordpress installation or under the wp-admin folder.

You can check the name of your custom configuration file by running:

php -i | grep user_ini.filename

I have created a plugin which makes it possible to change php settings from the Wordpress administration:

Custom PHP Settings

The plugin makes it possible to change settings either using the .htaccess file or the custom php.ini file, depending on how php is running.


Need Your Help

Is there any notification for detecting AirPlay in Objective-C?

iphone objective-c ios

I am using MPVolumeView for showing Airplay icon and it works fine.