Fixing Magento 2 Readiness Check by local php.ini

Magento 2 heavily relies on the php.ini setting to make 100% sure that magento will run without any error.

While installing magento 2 you may encounter “Readiness Check” Errors.

The reasons for those errors are either you have not created local php.ini file for your project in the project folder or magento is unable to load your local php.ini file which you created in your project.

First step is to configure your local project php.ini file.

open the “php.ini” file from your magento root directory, in my case it is  /public_html/magento/php.ini
Add necessary variables

For example I have added following line to php.ini file

always_populate_raw_post_data = -1

Save the file

Next step is to check if you have php.ini file created in setup directory.


If there is no php.ini file in setup directory then copy the php.ini file from magento root directory and paste in setup directory

copy /public_html/magento/php.ini to /public_html/magento/setup/php.ini

Last step is to make sure either your php.ini file is loaded in magento

Search for “checkPopulateRawPostSetting” function

In that function call “phpinfo();” function and save the file

private function checkPopulateRawPostSetting()

Visit following url according to your website

It will be showing phpinfo page
Search for “Loaded Configuration File” or “php.ini

It will be showing from where configuration file is loaded, if it is showing that php.ini is loaded from setup directory, you are all OK.

You can check all your custom settings here. Once ready remove phpinfo function and save the file and continue installing magento. It will work like a charm.

One thought on “Fixing Magento 2 Readiness Check by local php.ini

Leave a Reply

Your email address will not be published. Required fields are marked *