PHP user.ini file

If you don’t know already, I am obsessed with optimising everything around me, including PHP. Today, I am going to share a tip to optimise PHP, particularly PHP-FPM. It assumes that you do not use “.user.ini” file or you never heard about it. 😉

As per the official docs for .user.ini file, by default, PHP scans each user directory for the file named “.user.ini” for every 5 minutes. So, it is much better than what Apache does to .htaccess files. Still, if you don’t use it, just disable it in the php.ini file. Just set “user_ini.filename” as empty in php.ini of your PHP-FPM process. To make it easier, the default php.ini file already contains the line commented out. So, uncommenting is enough to disable “.user.ini” functionality and make your server a bit more snappier!

Stay tuned for further optimisation tips!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s